tomoakley / freemeals.uk

MIT License
10 stars 10 forks source link

Provider useEffect loop #38

Closed elstob closed 3 years ago

elstob commented 3 years ago

Provider had a useEffect dependency on an unstable useState setter (and probably was buggy as it should have been listening to the selectedIndex it was setting instead).

Long term make that setter stable and add it to the deps but for now replace it with selectedIndex as the dep and ignore the exhaustive deps warning