@barusu-react/hello-world

a demo of react package with ts+react+stylus

Usage no npm install needed!

<script type="module">
  import barusuReactHelloWorld from 'https://cdn.skypack.dev/@barusu-react/hello-world';
</script>

README

@barusu-react/hello-world


This is a demo project that demonstrates how to package a library that uses the react+stylus+ts technology stack.

hello-world.png

See sourcecodes in github for details.

Install

  • npm

    npm install --save @barusu-react/hello-world
    
  • yarn

    yarn add @barusu-react/hello-world
    

Usage

  • Use in React project:

    // index.tsx
    import React from 'react'
    import ReactDOM from 'react-dom'
    import { HelloWorld } from '@barusu-react/hello-world'
    import '@barusu-react/hello-world/lib/esm/index.css'
    
    ReactDOM.render(
      <HelloWorld />,
      document.getElementById('root')
    )