Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] useState 为何无函数式初始化方式 #361

Open
fantasticsoul opened this issue Nov 17, 2023 · 5 comments
Open

[Question] useState 为何无函数式初始化方式 #361

fantasticsoul opened this issue Nov 17, 2023 · 5 comments

Comments

@fantasticsoul
Copy link
Contributor

为何 useState 没有和 react 对其呢?

useState<T=any>(initalState: T | ()=>T )
@yisar
Copy link
Collaborator

yisar commented Nov 17, 2023

我之前不知道react还有函数式的方式
fre我基本上弃坑了,sorry

@zengxiaoluan
Copy link

我之前不知道react还有函数式的方式 fre我基本上弃坑了,sorry

为什么弃坑了呢?

@yisar
Copy link
Collaborator

yisar commented Apr 10, 2024

为什么弃坑了呢?

前端框架时代造就结束了,fre没什么用

@zengxiaoluan
Copy link

zengxiaoluan commented Apr 10, 2024

@yisar 听朋友讲,你连前端或都已经弃坑了

@yisar
Copy link
Collaborator

yisar commented Apr 10, 2024

@yisar 听朋友讲,你连前端或都已经弃坑了

对基本上弃坑了,前端只是用来混口饭吃而已

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants