Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
337 views
in Technique[技术] by (71.8m points)

reactjs - How handle derived state in functional components?

I'm often used class component in which we have getderivedstatefromprops method but how handle those derived state in functioncal component so anybody guide me How can I handle upcoming derived state?

question from:https://stackoverflow.com/questions/66057345/how-handle-derived-state-in-functional-components

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

use the useEffect hook, you can read more here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...