-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New blog react 19 #9
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,10 +10,25 @@ slug: 'a-quick-glance-at-the-react-19-beta-feature-set' | |||||
|
||||||
- Some spicy new hooks and a concept of async functions being "actions" | ||||||
- `useTransition` | ||||||
- a React Hook that lets you update the state without blocking the UI. | ||||||
- `const [isPending, startTransition] = useTransition();` | ||||||
- [https://react.dev/reference/react/useTransition](https://react.dev/reference/react/useTransition) | ||||||
- `useOptimistic` | ||||||
- a React Hook that lets you optimistically update the UI. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capitalise the first letter of the sentence and remove the extra space for consistency and professionalism. - - a React Hook that lets you optimistically update the UI.
+ - A React Hook that lets you optimistically update the UI. Committable suggestion
Suggested change
|
||||||
- `const [optimisticState, addOptimistic] = useOptimistic(state, updateFn);` | ||||||
- [https://react.dev/reference/react/useOptimistic](https://react.dev/reference/react/useOptimistic) | ||||||
- `useActionState` | ||||||
- a Hook that allows you to update state based on the result of a form action. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capitalise the first letter of the sentence for consistency and professionalism. - - a Hook that allows you to update state based on the result of a form action.
+ - A Hook that allows you to update state based on the result of a form action. Committable suggestion
Suggested change
|
||||||
- `const [state, formAction] = useActionState(fn, initialState, permalink?);` | ||||||
- [https://react.dev/reference/react/useActionState](https://react.dev/reference/react/useActionState) | ||||||
- `useFormStatus` | ||||||
- a Hook provides status information of the last form submission. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capitalise the first letter of the sentence for consistency and professionalism. - - a Hook provides status information of the last form submission.
+ - A Hook provides status information of the last form submission. Committable suggestion
Suggested change
|
||||||
- `const { pending, data, method, action } = useFormStatus();` | ||||||
- [https://react.dev/reference/react-dom/hooks/useFormStatus](https://react.dev/reference/react-dom/hooks/useFormStatus) | ||||||
- `useDeferredValue` | ||||||
- a React Hook that lets you defer updating a part of the UI. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capitalise the first letter of the sentence for consistency and professionalism. - - a React Hook that lets you defer updating a part of the UI.
+ - A React Hook that lets you defer updating a part of the UI. Committable suggestion
Suggested change
|
||||||
- `const deferredValue = useDeferredValue(value);` | ||||||
- [https://react.dev/reference/react/useDeferredValue](https://react.dev/reference/react/useDeferredValue) | ||||||
- Actions can now be passed to `<form action={actionFunction}>` | ||||||
- The `use` function - new API to read resources in render. Which is named like a hook but doesn't have the same conditional code issue hooks have, you can give it promises and contexts according to the post. | ||||||
_Confusing at first glance, maybe it'll settle over time._ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalise the first letter of the sentence for consistency and professionalism.
Committable suggestion