Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Dynamic selector for React components

NotificationsYou must be signed in to change notification settings

vacom/Requite

Repository files navigation

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.

NPMJavaScript Style Guide

Requite

Installation

Just install the dependency and start using

npmirequiteoryarnaddrequite

How to import

After installing the dependency, just import the components you need

importRequitefrom"requite";

Usage

importRequitefrom"requite";constText=()=><p>Hello Text Component</p>;constHeader=()=><h1>Hello Header Component</h1>;constErrorHandler=()=><div>Component Type not found on Selector</div>;//this is not requiredclassExampleextendsComponent{render(){constComponents={1:Text,Header:Header};return<Requitelist={Components}type={"Header"}error={ErrorHandler}/>;}}

License

MIT ©vacom

About

Dynamic selector for React components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp