-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
The compiler reorganizes the order at which lines are run such that reactive statements are only run at the end, that already by itself creates unexpected output such as :
let value = "hi"
$: value = "hello";
console.log(value) // prints "hi"but then, when you'd expect reactive statements to at least keep the right order between themselves, this happens:
let value = "hi"
$: console.log(value) // prints "hello"
$: value = "hello";the current component initialization order is the following :
- run static statements
- run "one time" dynamic statements
- run dynamic statements
related : #4371