Open bloodyKnuckles opened 8 years ago
A) Don't use vdom to include scripts, this is a bad idea and will keep causing re-download problems and you're going to have a bad time.
B) key
solves exactly this
Fixed your example to show it: http://requirebin.com/?gist=chrisinajar/0d5e8d8346ac420ea76c1eab8b673db5
Given:
[a,b] and [b]
The resulting diff patch replaces a with b then removes b, rather than simply removing a.
Here's an example: http://requirebin.com/?gist=a1fe075b4553c3b44354657c1d6625d5
Results in:
The problem in this particular case is that
bundle.js
gets downloaded again and therefore re-executed, resetting state vars, etc.