Skip to main content
100%

React Starter

✓ Published1🌍 Public
NNita
Last edited May 29, 2020
Created on May 29, 2020
Forked from React Starter

A minimal React starter demonstrates the difference between a current state value and the value rendered one frame earlier. The application uses React’s `useState` to hold an initial count of 20, and `useRef` combined with `useEffect` to store the previous count after each render. It displays both numbers in an `h1` element. The example loads React and ReactDOM from unpkg CDN, renders via `ReactDOM.render`, and tracks the previous value by updating a ref inside a side-effecting hook, showing a simple state-update pattern without external data.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes