demo inside pages\test.js
run npm install
and npm run dev
, then goto test in navbar.
https://stackoverflow.com/questions/72672547/why-setstate-dont-affect-state-value-outside-jsx-and-what-is-going-on-in-my-cod
JavaScript
run npm install
and npm run dev
, then goto test in navbar.