Data Structure
Working all day for business data structures.
I am not sure if I can document it clearly.
Redux & useEffect & refresh page
I saved some data using Redux Persist.
But when I refreshed my page, the data was reset.
After checking the codes I found the reason: I got the data through Restful APIs in useEffect. When the page was refreshed, the data was reset to the api results.
Adding a status should fix that bug.
Time is money, friend
Orz… I need more time.
Related Platforms
(Github Issues) / (Notion) / (Blog)
Advertisement
(A website to optimize your resume and to boost your career: Nonpareil.me)
数据结构
搞了一整天的业务数据结构。我有点怀疑我能不能把它明确地文档化,有点复杂。
Redux & useEffect & 页面刷新
我在Redux Persist中存储一些数据,但是当我刷新页面时,数据被重置了。
查了一遍代码之后发现了问题所在:我的数据来自后台Restful API,在页面的useEffect中向后台请求。页面刷新会触发useEffect,数据就会被重置为后台返回的值。
加一个数据状态判定应该就好了。
时间就是金钱
要做的事情太多了,我需要更多时间……
相关平台
(Github Issues) / (Notion) / (Blog)