@linkcs/props-injecter

0.1.1 • Public • Published

Props-Injecter

React component that injects props to its children.

How to Use

The two following codes are equivalent:

import React from "react";
import PropsInjecter from "@linkcs/props-injecter";

const App = () => (
  <React.Fragment>
    <Foo loading counter={5} />
    <Bar loading counter={5}>
      <Foobar loading counter={5} />
    </Bar>
  </React.Fragment>
);
import React from "react";
import PropsInjecter from "@linkcs/props-injecter";

const App = () => (
  <PropsInjecter loading counter={5}>
    <Foo />
    <Bar>
      <Foobar />
    </Bar>
  </PropsInjecter>
);

/@linkcs/props-injecter/

    Package Sidebar

    Install

    npm i @linkcs/props-injecter

    Weekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    8.99 kB

    Total Files

    10

    Last publish

    Collaborators

    • cr4zysheep
    • seasalt0
    • ogdentrod
    • ayc0