Convert from class to functional component?

后端 未结 0 1514
傲寒
傲寒 2020-12-11 06:40

I\'m trying to learn React-Hooks so I wrote a little function that shows the width of the window in real time:

Class component:

state = { windowWidth:          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题