nraynes / the-drinks-on-me

0 stars 1 forks source link

App won't use state for user story#5 #11

Closed mojo9492 closed 3 years ago

mojo9492 commented 3 years ago

7 is blocked:

The way the app is set up will never re-render because we do not useEffect, leaving state useless. This problems exists only when you do not useEffect, because the app has no reference when to render changes and uses last render

Solution: useEffect inside App.js isntead of a for loop in index.js that prevents react from doing react

nraynes commented 3 years ago

Master branch has useEffect in place and a reRendering state that solves this issue.