Message from JavaScript discussions

December 2020

β€” Let's say maybe the cache flushes to main DB every 30s or something like that

β€” 

And you'd have a similar setup outbound, for requesting likes, main DB would be hit only if edge caches don't have a cache for likes for that item, and then they'd cache it

β€” What is simplier, implementing a cache barrier or a registration form🀀

β€” Hmmm

β€” Depends on how much work is getting put into the frontend / styling stuff for the form I think

β€” TRGWII thanks for explaining and thank you too determin1st

β€” Im doing some cache-buffer things now, (you know.. not leaving infinite scroll idea ha-ha) so, it's the second week i can't catch those +1/-1 trails🀀 to assemble a solid buffer

Message permanent page

β€” The below code re render the component forever. Does anyone know why this is happening?

export default function BookTypes(props: any){
const dispatch = useDispatch()

const bookTypes = useSelector(bookTypeListSelector)


useEffect(() => {
dispatch(fetchData(BookType, Book));
}, [bookTypes])

return (
<Page title="Book Types">
<Table data={bookTypes} />
</Page>
)
}

Message permanent page

β€” Does fetchData function change bookTypes value?

β€” So what happens is dispatch calls action creator fetchData which updates the redux store after fetching data from the api. Then the selector uses a reselect selector to get the data from the store... which is memoized. so after about 2 renders, the useEffect should not run as it is the same data in the store that has been fetched from the api. Maybe I am going wrong somewhere

Message permanent page

β€” How many spots do u send these things to every time?

β€” Asking for a friend