简体   繁体   English

使用withStateHandler和withState + withHandler之间的区别

[英]Difference between using withStateHandler and withState + withHandler

Does withStateHandler has some benefit over using withState and withHandler together? 请问withStateHandler比使用一些好处withStatewithHandler在一起吗?

Why should I use withStateHandler at all when I can get same functionality with withState and withHandler ? 为什么要使用withStateHandler在所有的时候,我可以得到相同的功能withStatewithHandler

withStateHandler几乎没有什么好处,例如less codefewer function imports ,但这不会带来很多性能提升,实际上,如果您不必担心代码拆分的大小或类似的事情,它们将以相同的方式执行相同的操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM