[2025-05-24] useSelector@Redux tips, Works and Human Nature / 关于Redux中useSelector的用法,关于工作人性的一点想法

React

useSelector

useSelector can only be used in React components or Hooks. Basically, Redux was designed for React Components.
I tried to build a normal js function to read variables from Redux and it’s not OK. The variables should be passed as parameters.

About The Works, and Human Nature

It’s the human nature — or my nature—that I would like to do things which are more familiar or easier.
I have to do a lot of core development work to do, including mapping website elements to database columns, db save / modify processes, api optimization… but I stick to modifying the appearance of pages, or designing the logo.
I even would rather to read book about design, or browse websites about design to improve my aesthetic sense. I spent quite a lot of time, but there were hardly any improvements. My design still looks ugly.
Now I am trying to do hard things or things I don’t like very much first, after I get up.
Fortunately AI helps a lot. I have AI writing codes for me, some sql queries, some components, some tailwind css, etc. I can focus most of my energy on the framework and thoughts.

Related Platforms

(Github Issues) / (Notion) / (Blog)

Advertisement

(A website to optimize your resume and to boost your career: Nonpareil.me)


React

useSelector

useSelector只能在组件或者Hooks中使用。毕竟Redux是为了React设计出来的。
我尝试在一个普通的JS函数中获取一些Redux管理着的变量值,没有成功。这些值还是需要在调用时以参数形式传递。

关于工作分配和人的本性

人的本性——或者说我的本性——就是这样,我总是会倾向于先做我熟悉的或者不那么困难的工作。
我有很多核心开发工作需要完成,比如把页面元素和数据库的数据对应起来,实现数据库存储逻辑,API调用优化……但是我选择先去调整页面是否好看,或者设计LOGO。
我甚至宁愿去看设计类的书,或者浏览设计类的网站来提升我的审美。花了不少时间,没觉得有什么提升,依然惨不忍睹。
现在我会在起床后首先做我不那么喜欢的或者比较困难的事。
好在现在有AI,让工作轻松了很多。我使用AI来实现一些代码,包括一些组件,SQL语句,tailwind CSS设置等等。这让我能够更加集中精力,去设计框架和实现我的想法。

相关平台

(Github Issues) / (Notion) / (Blog)

推广

(优化简历,助力职场:Nonpareil.me)

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

滚动至顶部