Seitu
React

Components

Subscribes to a value and passes it to children.

Subscription()

Subscribes to a value and passes it to children. Prefer over the hook when you want a component API.

Examples

Basic usage

/app/page.tsx
'use client'

import {  } from 'seitu/web'
import {  } from 'seitu/react'
import * as  from 'zod'

const  = ({
  : 'sessionStorage',
  : { : .(), : .() },
  : { : 0, : '' },
})

export default function () {
  return (
    < ={}>
      {() => <>{.}</>}
    </>
  )
}

With selector

/app/page.tsx
'use client'

import {  } from 'seitu/web'
import {  } from 'seitu/react'
import * as  from 'zod'

const  = ({
  : 'sessionStorage',
  : { : .(), : .() },
  : { : 0, : '' },
})

export default function () {
  return (
    < ={} ={() => .}>
      {() => <>{}</>}
    </>
  )
}

Edit on GitHub

Last updated on

On this page