@vyke/solid-destructurable@0.0.2
latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
JSR Score
82%
Published
4 months ago (0.0.2)
@vyke/solid-destructurable
Installation
npm i @vyke/solid-destructurable
API
destructurable
Returns a destructurable object
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<StoreState>({ theme: 'light' }) const { theme } = destructurable(store, { theme: 'dark' }) return ( <div> {title()} {theme()} </div> ) }
Others vyke projects
Add Package
deno add jsr:@vyke/solid-destructurable
Import symbol
import * as mod from "@vyke/solid-destructurable";
---- OR ----
Import directly with a jsr specifier
import * as mod from "jsr:@vyke/solid-destructurable";
Add Package
npx jsr add @vyke/solid-destructurable
Import symbol
import * as mod from "@vyke/solid-destructurable";
Add Package
yarn dlx jsr add @vyke/solid-destructurable
Import symbol
import * as mod from "@vyke/solid-destructurable";
Add Package
pnpm dlx jsr add @vyke/solid-destructurable
Import symbol
import * as mod from "@vyke/solid-destructurable";
Add Package
bunx jsr add @vyke/solid-destructurable
Import symbol
import * as mod from "@vyke/solid-destructurable";