van icon indicating copy to clipboard operation
van copied to clipboard

state management? css?

Open laoshaw opened this issue 2 years ago • 4 comments
trafficstars

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.

laoshaw avatar Aug 03 '23 19:08 laoshaw

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

artydev avatar Aug 03 '23 21:08 artydev

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

Tao-VanJS avatar Oct 01 '23 21:10 Tao-VanJS

@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.

b-rad-c avatar Nov 29 '23 17:11 b-rad-c

Thanks!

laoshaw avatar Nov 29 '23 17:11 laoshaw