Skip to content

Callback-influenced values reset via HMR #472

Open
@TheAlexLichter

Description

@TheAlexLichter

Hey 👋

data values that are manipulated via a callback function are (wrongly) changed to their original values when HMR kicks in.

Reproduction:

  1. Fork https://codesandbox.io/s/codesandbox-nuxt-exyst
  2. See that isStripeLoaded is "no" first and then turns to "yes" when the script is loaded
  3. Write something in the template and save
  4. See that it turns to "no" again and stays at "no" even though the script is (still) loaded.

Solution

Re-execute callbacks after HMR (might have some false positives related to the value of skip ?)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions