Is there any way to get and handle a context value in another place except render
method like constructor
or a custom function that I declared in my component class?
In a way that I know, the consumer tag surrounds the fetch function but, I don't want to handle value in consumer tag.
Any idea?
This is possible, You may use like
constructor(props, context) {
super(props, context)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With