dailylog 03-01-21 pt 2
RE: Caroline Googlesheets
- Is it best to get ALL the data right away and then simply display what I want when clicked?
- Should I use useMemo?
- How many ‘useEffects’ in one file are too many in one file?
30 second summary:
You don’t need to use a callback with setState – you just need to do a useEffect. This is how I did it (not sure if best practice?)
useEffect(() => {
const formatAboutData = () => {
if (aboutData) {
aboutPhoto = aboutData[1].content['$t'];
console.log('running NOW', aboutData[1].content['$t']);
}
};
formatAboutData();
}, [aboutData]);