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
feat: allow state created in deriveds/effects to be written/read locally without self-invalidation (#15553)
* move parent property onto Signal
* don't self-invalidate when updating a source create inside current reaction
* lazily create deep state with parent reaction
* no need to push_derived_source with mutable_state, as it never coexists with $.derived
* reduce indirection
* remove state_unsafe_local_read error
* changeset
* tests
* fix test
* inelegant fix
* remove arg
* tweak
* some progress
* more
* tidy up
* parent -> p
* tmp
* alternative approach
* tidy up
* reduce diff size
* more
* update comment
Copy file name to clipboardExpand all lines: packages/svelte/src/internal/client/errors.js
-15Lines changed: 0 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -307,21 +307,6 @@ export function state_prototype_fixed() {
307
307
}
308
308
}
309
309
310
-
/**
311
-
* Reading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state
312
-
* @returns {never}
313
-
*/
314
-
exportfunctionstate_unsafe_local_read(){
315
-
if(DEV){
316
-
consterror=newError(`state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using \`untrack\` to read locally created state\nhttps://svelte.dev/e/state_unsafe_local_read`);
0 commit comments