vanjs-org / van

🍦 VanJS: World's smallest reactive UI framework. Incredibly Powerful, Insanely Small - Everyone can build a useful UI app in an hour.
https://vanjs.org
MIT License
3.82k stars 88 forks source link

state management? css? #74

Open laoshaw opened 1 year ago

laoshaw commented 1 year ago

how to manage state with vanjs, is this more of a SPA that can have client side routing, state etc?

also, an example with some well known css will be nice, e.g bootstrap 5.

artydev commented 1 year ago

Hello, VanJS is completely agnostic regarding css, routing. You can use whatever library you feel comfortable with

For the state magement look at all the examples

Among them Examples

Regards

Tao-VanJS commented 1 year ago

Hi @laoshaw,

Here is an SPA example with client-side routing support, based on VanJS's powerful builtin state management and state derivation:

https://vanjs.org/demo#code-browser

b-rad-c commented 10 months ago

@laoshaw - I just contributed an add-on for VanJS that adds routing, navigation and a navLink component, you can check it out here. It integrates with window.history.state for navigation based state, however that protocol is limited. I think using van.state or van.reactive (from the official X add-on) is sufficient for more complex application state.

laoshaw commented 10 months ago

Thanks!