@vyke/solid-destructurable

Helper to destructure reactive objects - like props or stores - or signals of them into a separate accessors updated individually. ## Installation ```sh npm i @vyke/solid-destructurable ``` ## API ### destructurable Returns a destructurable object ```tsx import { createStore } from 'solid-js' import { destructurable } from '@vyke/solid-destructurable' type StoreState = { theme?: 'light' | 'dark' } type AppProps = { title: string } function App(props: AppProps) { const { title } = destructurable(props) const store = createStore({ theme: 'light' }) const { theme } = destructurable(store, { theme: 'dark' }) return (
{title()} {theme()}
) } ``` ## Others vyke projects - [Flowmodoro app by vyke](https://github.com/albizures/vyke-flowmodoro) - [@vyke/tsdocs](https://github.com/albizures/vyke-tsdocs) - [@vyke/val](https://github.com/albizures/vyke-val) - [@vyke/dom](https://github.com/albizures/vyke-dom)