@re-up/sandbox

0.0.17 • Public • Published

@re-up/sandbox

install:

bun i @re-up/sandbox

usage:

import {condish} from '@re-up/sandbox'

function App(){

  const {loading, data} = useFetch()

  const ConditionalComponent = useCallback(() => {
    const options = condish(<Loading/>, <Viewer {...data}/>)
    return <>{options.get(loading)}<>
  }, [loading, data])


  return <ConditionalComponent />
}

Package Sidebar

Install

npm i @re-up/sandbox

Weekly Downloads

1

Version

0.0.17

License

MIT

Unpacked Size

148 kB

Total Files

7

Last publish

Collaborators

  • re-up