how do a set a boolean value to false from one react component to main app.js

trying to use the handle submit function to change the isAuthinticated to true from false

screenshot of code

27 thoughts on “how do a set a boolean value to false from one react component to main app.js”

  1. This would be easy to achieve if you use some kind of global store to store such values. Typical options include Redux, Mobx, etc.

    Define your isAuthenticated variable as a global store variable. mutate its value using corresponding package methods like Redux dispatch events or similar from your functions anywhere else in the app.

    Reply

Leave a Comment