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 strict mode nothing rendering #112

Closed amritk closed 7 months ago

amritk commented 7 months ago

When react strict mode is enabled, there is nothing rendered in the component. No errors are thrown either. Is there a way to see what the error is?

const VeauryComponent = applyVueInReact(ApiClient) as JSX.ElementType
...
<VeauryComponent />
...

It works fine when strict mode is disabled

devilwjp commented 7 months ago

@amritk You can run the react test project(dev-project-react/src/index.js) in the veaury source code and uncomment the strict mode. It works fine.

image

  1. Fork veaury.
  2. run npm run setup:yarn in the command line.
  3. run npm run dev:react in the command line.
devilwjp commented 7 months ago

@amritk I think the type definition of VeauryComponent is incorrect. It should be a component, not elementType.

amritk commented 7 months ago

Hmm maybe it has something to do with my setup then. Thanks