This code contains all the examples used in the article https://www.scalablepath.com/react/react-19
When the code is run, you will be able to test all the code examples mentioned in the article
Run the following in a console prompt from within the code directory:
> npm install --legacy-peer-depsNote: This example app code was quickly hoisted using create-react-app, which is out of date for React 19. You may need to use the --legacy-peer-deps flag if npm install produces an error message.
Run the following in a console prompt from within the code directory:
> npm startThe new use hook is in use in the Page.js component. the old method is in the OldPage.js directory. To see the old method, edit the Main.js file as directed in the comments.
Example3b.js is not included the Page.js Example 3 has the two buttons example 3b does not, but you can put it in if you wish