π± Vraw is a implementation of react stateless components that can be used as a npm package in your projects.
using npm:
$ npm install vraw --save
in code:
import React, { Component } from "react";
// importing Clock component
import { Clock } from "vraw";
class App extends Component {
render() {
return (
// using Clock component
<Clock msg="It works!" date={new Date()} />
);
}
}
export default App;
Components are cool! We should use them everywhere. So, you expent time developing a lot of components and now you want to reuse them in another awesome project & all your projects need your components updated when a new feature is released (and you also need typechecking, tests, hot module replacement & all the good stuff).
.
βββ src
| βββ components
| βββ MyComponent # Your component
| βββ MyComponent.story.tsx # Storybook of your component
| βββ MyComponent.test.tsx # Jest + Enzyme tests
| βββ MyComponent.tsx # Its JSX + Typescript file
| βββ MyComponent.types.ts # Types for props
| βββ index.ts # Export Component
| βββ MyComponentX # Another component X
| βββ MyComponentY # Another component Y
| βββ MyComponentZ # Another component Z
| βββ stories.tsx # Storybook config file
βββ dist
| βββ index.js # Exporting all Componentss