api3dao / api3-dao-dashboard

API3 DAO dashboard
api3.eth/
14 stars 10 forks source link

Upgrade React to v18 #373

Closed mcoetzee closed 1 year ago

mcoetzee commented 1 year ago

What does this change?

How did you action this task?

React 18 strict mode triggers useEffect and useMemo hooks twice when mounting (in development). This results in a pretty poor developer experience as it causes our data hooks to trigger 3 times on mount (the third trigger is caused by the useMemo'ed smart contracts which are included in the useEffect dependency arrays). For me, it feels like the DX hit is too large, so this PR turns off strict mode.