Skip to content

Commit

Permalink
Update advice on single file
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Jan 12, 2024
1 parent 664a755 commit 733ac41
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions content/blog/2024/proxy-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ state, you are starting down the road to developing your own framework, and it
might be a good time to pause and see if your application has grown complex
enough to bring in something more robust.

This also works best when your logic is contained within a single file. If
you're wanting to share state values across files, you'll likely be happier
reaching for another solution.
This pattern does work well if other files want to update or access the state in
the store. However, you'll likely want to contain side effect logic to the file
where the state is defined. If you're wanting to define side effects across
files, you'd need to do that with callbacks, and likely start looking for ways
to abstract that out. At that point you'll likely be happier reaching for
another solution.

0 comments on commit 733ac41

Please sign in to comment.