Skip to content

React component to dynamically render components from url, export name inputs

License

Notifications You must be signed in to change notification settings

bewestphal/url-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Component

Given a Javascript file URL and exported component name, dynamically render React components.

Prerequisites:

  • Your javascript file must be compiled into browser compatible code. In other words, no ES6 or Node JS functions.
  • A sample library to create an API to perform such compilations can be found here: https://bitbucket.org/atlassian/pkgzip

Example Usage: Render React Bootstrap Alert

var url = "https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.32.3/react-bootstrap.min.js"

<URLComponent
  componentName="Alert"
  url={url}
  onComponentLoaded={this.onComponentLoadedCallback}
>
  Alert Text
</URLComponent>

About

React component to dynamically render components from url, export name inputs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published