R
Reactiflux

Enfield-li ā€“ 20-57 Jan 4

Enfield-li ā€“ 20-57 Jan 4

EEnfield-Li1/4/2022
No sure what will possibly cause a simple problem like this: "can't access lexical declaration 'initialState' before initialization", can someone help me take a look the code, I am so cluless šŸ˜µā€šŸ’«
No description
UUUnknown User1/4/2022
Message Not Public
Sign In & Join Server To View
EEnfield-Li1/4/2022
I changed the const initialState to var
UUUnknown User1/4/2022
Message Not Public
Sign In & Join Server To View
EEnfield-Li1/4/2022
the problem it disapeared
UUUnknown User1/4/2022
Message Not Public
Sign In & Join Server To View
EEnfield-Li1/4/2022
that's the whole context page maybe somewhere I imported cause problem?
UUUnknown User1/4/2022
Message Not Public
Sign In & Join Server To View
EEnfield-Li1/4/2022
Ok, Let me check if that's the case šŸ˜ŗ
EEnfield-Li1/4/2022
Could the set up of createContext cause this, because this is the only place I can use initialState..
No description
UUUnknown User1/4/2022
2 Messages Not Public
Sign In & Join Server To View
EEnfield-Li1/4/2022
Ok, I will try set up a sandbox..
UUUnknown User1/4/2022
3 Messages Not Public
Sign In & Join Server To View
EEnfield-Li1/4/2022
I don't understand what that means coolcry can you help me take a look at the code: https://codesandbox.io/s/zealous-bhaskara-lhi92 Strange enough, code sandbox seems have no problem with it, but my local browser just completely broken because of it.. I have looked into some others' code, just found out that, simply moving the initialState to a different file and import it to relevant places, can solve the "circular dependency" problem. Thank you man, thank you for the hint @jcampuza šŸ˜ŗ https://tenor.com/view/high-five-spongebob-patrick-jumping-high-five-gif-7888580 If it wasn't for the hint on that concept, these things makes no sense to me
UUUnknown User1/5/2022
2 Messages Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

Enfield-li ā€“ 20-57 Jan 4

Join Server