You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vue Hot Reload API doesn't work as expected when using api.rerender() on a component that uses slots.
exportdefault{render(){return(<button>{/* Try adding and then removing the TEST text. It won't be removed, just added as many times as you save. */}{this.$slots.default} TEST
</button>);},};
Seems like this was fixed (at least for templates) in 2.1.5, the release notes mentions:
Small across-the-board performance improvement for render functions compiled from templates. They now skip the normalization of nested children arrays based on information inferred from the templates at compile time.
However, this issue still persists when using render function (hence JSX), and potentially .vue files also ?
Error
Vue Hot Reload API doesn't work as expected when using
api.rerender()
on a component that uses slots.How to reproduce
npm run test:webpack
will start a development server. Go to tests\webpack\src\nativeModules\button.jsx, add / remove the TEST text and save.Workaround
Wrap your slots inside another node (like a span):
Notes
api.reload()
works as expected (the whole component gets rerendered).The text was updated successfully, but these errors were encountered: