varsome-react

React components for varsome app

Usage no npm install needed!

<script type="module">
  import varsomeReact from 'https://cdn.skypack.dev/varsome-react';
</script>

README

Varsome React Components

Developing

npm install
npm start
open http://localhost:3000

This starts a server that proxies http://127.0.0.1:8000 and injects the file static/components/bundle.js which is handled by Webpack. Now edit src/js/App.js or any of the components in src/js/results. With Webpack any change happening inside src (script or style) get's hot reloaded inside the browser without a page refresh. There's also a helper sidebar overlay displaying the actions (see redux-devtools). It can be toggled with Ctrl+h

Building

You can build the App with npm run build, which produces dist/bundle.js.

When the script is included in a page it looks for the following ids and attaches the respective React components inside them.

#variant-search-options
#variant-form
#variant-request
#variant-results
#result-sidebar

You can build the Components with npm run build-components, which produces dist/components-bundle.js.

See more details about embedding the components to Embedding VarSome Components page.

Resources