gloriasoft / veaury

Use React in Vue3 and Vue3 in React, And as perfect as possible!
MIT License
1.31k stars 83 forks source link

React router dom. #4

Closed 402Martin closed 2 years ago

402Martin commented 2 years ago

Hi, does veaury on vue allow the react components work with react-router dom

devilwjp commented 2 years ago

@402Martin If the base project is vue, vue-router should be imported, otherwise there will be conflict scenarios where vue-router and react-router interact with each other.

When the react component is imported into the vue project through veaury, it is recommended to use vue-router through injectPropsFromWrapper in the react components.

If the vue project does not import vue-router, then you can try react-router through veaury.

In conclusion, only one router library should be imported in the same project.

devilwjp commented 2 years ago

@402Martin I tried to use vue-router and react-router at the same time, and it runs smoothly, you can refer to dev-project-react/src/components/reactMissVue