React
Initial data and setState
It is common to use a setState to save the initial data for a component.
Now thinking about it, I am not sure why I got an error that the data cannot be shown from the state data. It seemed like the useState was not successful. Is that possible in a modal component?
I use redux to get my functions.
Restful API & Technical Debt
I should have designed some Restful APIs for my work, but now I have to develop as fast as I can, so I just put everything in a JSON string and send it to the backend…
A classic technical debt.
Related Platforms
(Github Issues) / (Notion) / (Blog)
Advertisement
(A website to optimize your resume and to boost your career: Nonpareil.me)
React
初始化数据和setState
组件通过setState存储初始化时的数据是很常见的行为。
现在仔细想一下,我不确定为什么我会遇到这个古怪的问题:使用setState后的本地数据来渲染,却会失败。似乎是我的setState没有成功。这可能吗?因为我在开发一个Modal类型的组件吗?
不管怎么样,我现在用Redux实现了功能。
Restful API和技术债务
我本应该好好设计一系列的Restful API,不过现在我需要快速实现功能,所以我就用了个JSON字符串,把参数都扔进去。返回也同样处理。
典型的技术债务,希望将来有机会重构。
相关平台
(Github Issues) / (Notion) / (Blog)