Skip to content

why does the function excute twice in child component? #7527

Discussion options

You must be logged in to vote

Because:

  • you call in in the template, so it will run on again every re-render
  • the child re-renders once because the msg prop changes.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@zhoufanglu
Comment options

@LinusBorg
Comment options

@zhoufanglu
Comment options

@LinusBorg
Comment options

Answer selected by LinusBorg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #7526 on January 13, 2023 08:44.