Segment react components are built using functional component patterns.
To develop locally you can run the start script to serve a web server. Eventually there will be docs that you will develop in and publish to github pages.
This approach is manual but it does have the added benefit of isolation and full control.
Visit the docs here
This library is intended to be used with SEGMENT CSS. You will need to include the css files to have proper styling.
You must also include the Eric Meyer reset file inside of your project. I wanted to keep this separate so you could device loading strategy.
You must also include material icons inside your index.html file for icons to work.
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
Right now this is for local development, you will link this with your other project. You can add your own publish step to NPM.
Create a final build
npm run build
Link for development
npm link
Run in watch mode for development
npm run dev
Run unit tests
npm run test
or
npm run test:watch || npm run test:coverage
All components are named exports and can be referenced like so:
import { Button } from 'segment_react'
SEGMENT REACT requires React ^16.8.1