use-with
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

Build Status Coverage Status install size

use-with

React Hooks + HOC.

Install

npm install use-with

Usage

import * as React from 'react';
import useWith from 'use-with';
import Hello from './Hello';

export default function Demo({className}) {
  const HelloWorld = useWith(Hello, {className, message: 'World'});

  return <>
    <HelloWorld />
    <HelloWorld />
    <HelloWorld />
    <HelloWorld className="last" />
  </>;
}

Workflow

# develop
npm start

# build
npm run build

# test
npm test

# commit changes
npm run commit

# publish
npm publish

/use-with/

    Package Sidebar

    Install

    npm i use-with

    Weekly Downloads

    22

    Version

    0.3.2

    License

    MIT

    Unpacked Size

    12.7 kB

    Total Files

    11

    Last publish

    Collaborators

    • wmzy