use-with

use-with

Usage no npm install needed!

<script type="module">
  import useWith from 'https://cdn.skypack.dev/use-with';
</script>

README

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