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
Simply hoist the store value to the top of the packaged file scope. This can be achieved using subscribe & tracking each store variable referenced in a component with a unique name.
I prefix stores with __ because the svelte compiler does not like variables with a $ prefix that it does not manage...
The text was updated successfully, but these errors were encountered:
btakita
changed the title
Hoist $store variables to packaged file scope
Hoist $store variables to the top scope of the referencing packaged file(s)
Sep 29, 2019
A possible solution to #3636
Simply hoist the store value to the top of the packaged file scope. This can be achieved using subscribe & tracking each store variable referenced in a component with a unique name.
Hoisting the store value will reduce the amount of subscribers to exported stores in other modules as well.Somewhat related, but a design pattern I've used in modules is
I prefix stores with
__
because the svelte compiler does not like variables with a$
prefix that it does not manage...The text was updated successfully, but these errors were encountered: