Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Tagname = 'Species';
- options.push(<Tagname {...attrs}/>);
- Warning: <Species /> is using uppercase HTML. Always use lowercase HTML tags in React.
- Warning: The tag <Species> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
- var Tagname = Species; //component itself, not string
- <Tagname {...attrs}/>;
- const Map = {
- "componenet1": Component1,
- "componenet2": Component2
- }
- let name = "componenet1";
- let Tagname = Map[name];
- <Tagname {...attrs}/>;
Add Comment
Please, Sign In to add comment