Skip to content
Source
Sign inSign up
TanStack/form

[v2] chore(examples): devtools and StrictMode in every React example #2406

Opendasjideepak(GitHub profile, opens in a new tab)wants to merge 2 commits intoalpha fromrefs/pull/2406/headopened

Showing 21 changed files with 18 additions and 4 deletions (loading 17).

x
0 of 21 viewed, 21 left
6 additions and 2 deletionsexamples/react/array/src/index.tsxModified
View file
@@ -3,7 +3,7 @@
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
import ReactDOM from 'react-dom/client'
import './index.css'
-import { useMemo, useRef, useState } from 'react'
+import { StrictMode, useMemo, useRef, useState } from 'react'
​
function ArrayForm({ items }: { items: Array<string> }) {
const form = useForm({
@@ -120,4 +120,8 @@
​
-ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
+ReactDOM.createRoot(document.getElementById('root')!).render(
+ <StrictMode>
+ <App />
+ </StrictMode>,
+)
6 additions and 1 deletionexamples/react/basic/src/index.tsxModified
View file
@@ -1,3 +1,4 @@
+import * as React from 'react'