Skip to content
loading...

re: variable passed through context does not change in the child when changing in the parent and vice versa VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Are you getting any errors? getAccountData needs to bind this in constructor or should be declared with an arrow syntax.
 

No mistakes
If i write

this.state = {
      id: '123',
};

then it will work.
this attaches correctly. But setState or timers do not change the object that is inside UserContext.Consumer

code of conduct - report abuse