DEV Community

Discussion on: variable passed through context does not change in the child when changing in the parent and vice versa

Collapse
 
dieldore profile image
Dieldore • Edited

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