Can I set function in state?

You can’t the way you have attempted but technically yes, you can have a function that returns the desired state you want initialised in your constructor.

Sizin İçin Seçtik  How do you use useContext in React hooks?

Leave a Reply

Your email address will not be published. Required fields are marked *

Can I set function in state?

You can’t the way you have attempted but technically yes, you can have a function that returns the desired state you want initialised in your constructor.

Sizin İçin Seçtik  How does setState work in Flutter?

Leave a Reply

Your email address will not be published. Required fields are marked *