1.0.2 • Published 5 years ago

requite v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Requite

Dynamic selector for React components. Great for creating dynamic pages. Through some form of interaction, for example Loop, a page can be created dynamically. It can be used for a dynamic editor or even through a Json file.

NPM JavaScript Style Guide

Requite

Installation

Just install the dependency and start using

npm i requite or yarn add requite

How to import

After installing the dependency, just import the components you need

import Requite from "requite";

Usage

import Requite from "requite";

const Text = () => <p>Hello Text Component</p>;
const Header = () => <h1>Hello Header Component</h1>;
const ErrorHandler = () => <div>Component Type not found on Selector</div>; //this is not required

class Example extends Component {
  render() {
    const Components = {
      1: Text,
      Header: Header
    };
    return <Requite list={Components} type={"Header"} error={ErrorHandler} />;
  }
}

License

MIT © vacom