Message from JavaScript discussions

December 2020

— 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>
)
}

— 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

— Like 3 groups. Because the problems are tough... 1 group sometimes cannot help solve the problem

— Drawing like Dani, but on the livescreen😅 think i found that +/-1

— You can do it, report when solved, i think it will take some manual navigation, but it's unusual behavior you described🤤 im lost in 1s, TRGWII doesn't code anymore, see, it's a lonely road, most of the time

Message permanent page

— I do code heh, doing some deno lately

— Deno is very cool, and just getting cooler and cooler

— Deno 1.6 will introduce deno compile