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
353 views
in Technique[技术] by (71.8m points)

reactjs - Wrapping 2 HOC to a component in React

Is there a way I can wrap two HOCs together?

export default withRouter(Page)
export default withTranslation()(Page);
question from:https://stackoverflow.com/questions/66054324/wrapping-2-hoc-to-a-component-in-react

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

1 Answer

0 votes
by (71.8m points)

Have you tried this? It should probably work.

export default withRouter(withTranslation()(Page));

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

...