Composability Patterns for Hologram - Looking for Your Ideas

Just to clarify - Context isn’t really meant to be a store. It’s for avoiding prop drilling by letting components emit data that flows down to their children (who access it via props with from_context).

You could use Context at a page level as a “global store” and mutate it from anywhere by specifying the action target, but it would feel awkward/indirect. Context is component-bound, like React’s Context API. It’s not a decoupled store like Redux or Svelte stores.

I think what you’re describing - a truly decoupled store - is what @nikfp mentioned earlier too. I’d love to see what that would look like translated to Hologram if you have ideas!

1 Like