Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 938 Bytes

README.md

File metadata and controls

50 lines (37 loc) · 938 Bytes

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