webfansplz / temir

Vue for interactive command-line apps
MIT License
1k stars 36 forks source link

Components were rendered twice? #16

Closed younggglcy closed 2 years ago

younggglcy commented 2 years ago

As the title described, it's unexpected.

Minimal repro link

Repro steps

  1. pnpm i
  2. pnpm dev

Type something and see the terminal.It was logged twice(before this PR has been merged, it was 4 times).

younggglcy commented 2 years ago

And I just updated the repro. Notice that if adding onMounted hook to a composable function, then "init" is also logged twice.

onMounted(() => {
  console.log('init')
})

So I guess there's maybe something wrong with the rendering mechanism?

webfansplz commented 2 years ago

It's actually a printout duplication issue,Let's ignore it for the moment.

younggglcy commented 2 years ago

Thanks for answering~