Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate separating state from components in the web-components #275

Open
alexgarel opened this issue Jan 30, 2025 · 0 comments
Open

Comments

@alexgarel
Copy link
Member

Right now the web-components mix rendering logic and state.
Most importantly, we use a mix of signals, dom reaching, to propagate state and it's quite messy (no clear pattern).
Also we also rely a lot on mixins which is sometimes hard to follow (composition can be better).

Investigate the use of https://www.npmjs.com/package/@lit-app/state to handle states.

We could have some state objects, like the search (query / result), the facets and each facets, etc.

Those states have to be handled by "search_name". Each state lives in it's own module and a get_xxx_state(search_name) function exist in each, it handle the fact that if search_name is null or '', it means "search-a-licious" (default name)

State objects have the advantage that they handle state propagation by themselves, so it could be really a good help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog (ready for dev)
Development

No branches or pull requests

1 participant