Skip to content

Commit 2fc1bc6

Browse files
authored
Use app selector in form docs (#175)
1 parent 7b3def4 commit 2fc1bc6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/forms.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ end
104104
```
105105

106106
```jsx
107-
const validationErrors = useSelector((state) => state.flash[:postFormErrors])
107+
import { useAppSelector } from '@javascript/store'
108+
109+
const validationErrors = useAppSelector((state) => state.flash.postFormErrors)
108110

109111
<Form {...form} extras={extras} validationErrors={validationErrors}>
110112
<TextField {...inputs.title} label="Post title" errorKey="post_title"/>

0 commit comments

Comments
 (0)