Something went wrong. Try again.
Web version of a solitaire game "Lobo" by James Ernest
Something went wrong. Try again.
README.md
Components #
Notes #
- Initially considered
nanotagsfor component logic, but I'm currently reaching point with it not being appropriate for this:- Definitely better for hydrating existing markup and pairs well (but not exclusively) with static site generators.
- I like the decision to not use the Shadow DOM.
- Aiming for rendering libraries that are small and don't need their own Vite plugin.
lit-htmlfunction should be enough.
- Hmm. Perhaps
nanostoreisn't right either. I don't want to manage re-renders when a slice of state data changes.- A signals library should help close this gap.
@lit-labs/signalsis a nice addition- Currently thinking about the event listening and coordination
- I might need to pull in
lit's web component portion. - But if I'm doing that, I have to consider the Shadow DOM styles :c
- Gah!
- I might need to pull in
- Lit does support a way to render components in the Light DOM
- Implementing
createRenderRoot - Normally, I wouldn't reach for this, but I am explicitly wanting my global styles to work here
- Another reason why I wanted
nanotagsto work - I don't want to manually re-opt into receiving the cascade
- Another reason why I wanted
- Implementing
With this, I can go ahead and move into web components for emitting custom events- Nevermind, somewhere in this setup, Vite/TypeScript doesn't play well together
- I'll see about continuing with my manual
lit-htmlsetup - Oh right, I can still emit
CustomEvents. Okay, problem solved.
- Hmm. Now I'm at a fork in the road between signals and
nanostores- I want to utilize signals (via
@lit-labs/signals) since it's meant to integrate theSignalsproposal.- Provides integration with
litandlit-html - Would eventually be a built-in language feature
- Provides integration with
- On the other hand
- The
signal-polyfillis based on the proposal that is currently at Stage 1, which is always up for change @lit-labs/signalsis also marked as experimental
- The
- Considering making a custom
lit-htmlintegration withnanostores.@nanostores/litassumes use ofLitElement/ web components- Thankfully
litprovides an awesome async directives tutorial
- I want to utilize signals (via