From 8c73a4d1867b051c1622a4a4f582055c011a8307 Mon Sep 17 00:00:00 2001 From: botre Date: Fri, 8 May 2026 14:17:33 +0200 Subject: [PATCH] Fix typos and refresh framework snippets - Fix typos across notification-email, redirection, additional-workspaces, slack, webhooks - React: replace removed ReactDOM.render with createRoot - Vue: convert snippets to -``` diff --git a/docs/examples/nuxtjs.md b/docs/examples/nuxtjs.md index e58f220..db580fc 100644 --- a/docs/examples/nuxtjs.md +++ b/docs/examples/nuxtjs.md @@ -1,13 +1,35 @@ --- -title: Nuxt.js +title: Nuxt lang: en-US --- -# Nuxt.js +# Nuxt ## Fetch ```vue + + - - ``` diff --git a/docs/examples/react.md b/docs/examples/react.md index be4045c..590b83a 100644 --- a/docs/examples/react.md +++ b/docs/examples/react.md @@ -12,8 +12,8 @@ Check out our official React hooks: [use-formspark](https://github.com/formspark ::: ```jsx -import React, { useState } from "react"; -import ReactDOM from "react-dom"; +import { useState } from "react"; +import { createRoot } from "react-dom/client"; import { useFormspark } from "@formspark/use-formspark"; const FORMSPARK_FORM_ID = "your-form-id"; @@ -41,14 +41,14 @@ const Application = () => { ); }; -ReactDOM.render(, document.getElementById("root")); +createRoot(document.getElementById("root")).render(); ``` ## Fetch ```jsx -import React, { useState } from "react"; -import ReactDOM from "react-dom"; +import { useState } from "react"; +import { createRoot } from "react-dom/client"; const FORMSPARK_ACTION_URL = "https://submit-form.com/your-form-id"; @@ -78,5 +78,5 @@ const Application = () => { ); }; -ReactDOM.render(, document.getElementById("root")); +createRoot(document.getElementById("root")).render(); ``` diff --git a/docs/examples/sapper.md b/docs/examples/sapper.md deleted file mode 100644 index ab44fd2..0000000 --- a/docs/examples/sapper.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Sapper -lang: en-US ---- - -# Sapper - -## Fetch - -```html - - -
- +
``` diff --git a/docs/examples/sveltekit.md b/docs/examples/sveltekit.md new file mode 100644 index 0000000..3016739 --- /dev/null +++ b/docs/examples/sveltekit.md @@ -0,0 +1,57 @@ +--- +title: SvelteKit +lang: en-US +--- + +# SvelteKit + +## HTML form + +The simplest integration is a plain HTML form that posts directly to Formspark. +No JavaScript is required. + +```svelte + +
+ + +
+``` + +## Fetch + +```svelte + + + +
+ + +
+``` diff --git a/docs/examples/vue.md b/docs/examples/vue.md index 10a082c..b744f9b 100644 --- a/docs/examples/vue.md +++ b/docs/examples/vue.md @@ -13,49 +13,55 @@ functions: [vue-use-formspark](https://github.com/formspark/vue-use-formspark). ::: ```vue -