gloriasoft / veaury

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

v-for with several applyPureReactInVue components breaks reactivity #120

Closed nhaustov closed 4 months ago

nhaustov commented 4 months ago

Using applyPureReactInVue sometimes causes reactivity to stop working. I have created a simple example based on dev-project-vue3 (full diff attached). Typing into inputs does not cause model to update. Same React components with applyReactInVue wrappers works.

    <PureBox>
      <span>v-for with PureInput wrapped in PureBox breaks. Typing into inputs do not change values.</span>
      <PureBox v-for="e in arr2" :key="e.id">
          <PureInput :value="e.value" @change="e.value = $event.target.value"/>
      </PureBox>
    </PureBox>

...
const PureBox = applyPureReactInVue(ReactBox)
const PureInput = applyPureReactInVue(ReactInput)

diff.txt

devilwjp commented 4 months ago

@nhaustov Thx! This bug will be fixed recently.

devilwjp commented 4 months ago

@nhaustov try 2.3.17-beta.1, npm i veaury@beta

nhaustov commented 4 months ago

@devilwjp Confirmed - the fix works with the simple example as well as my more complex app. Thanks - appreciate your work! I do have few more issues to report separately.