Skip to content

Neha/react-19-examples

Repository files navigation

React19 New Features

This repo has the examples of ReactJS 19 new features:

  1. Action

  2. useFormState()

  3. useFormStatus()

  4. useOptimistic()

  5. use() for fetch

  6. use() for context()

How to use this repo?

  1. Clone the repo and run npm i

  2. Once node_modules are generated now run the dev server npm run dev

  3. Go to browser and run localhost (as mentioned in the terminal)

  4. Go to App.jsx and uncomment/comment the specific example you want to hide/run

  5. Component and features:

  • Action: to show how action works in React19

  • FormState: to show how useFormState() works in React19

  • FormStatus: to show how useFormStatus() works in React19

  • Optimistic: to show how useOptimistic() works in React19

  • Theme: to show how to use() with context() in React19

  • Users: to show how to use() for API calls in React19

PS: While writing these code these examples were working. As ReactJS 19 is still WIP please update the version accrodingly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published