# react-component-kit

> reusable react component

Latest version **0.0.7** (published 2015-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-component-kit
pnpm add react-component-kit
yarn add react-component-kit
bun add react-component-kit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2015-05-15 |
| First published | 2015-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.12.x |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | yes |
| Author | linmxy |
| Maintainers | mikelin |
| Keywords | npm |

## Links

- npm: https://www.npmjs.com/package/react-component-kit
- Repository: https://git@github.com/linmxy/react-component-kit
- Homepage: https://github.com/linmxy/react-component-kit#readme
- Issues: https://github.com/linmxy/react-component-kit/issues
- npm.io page: https://npm.io/package/react-component-kit

## Dependencies (5)

- [react](https://npm.io/package/react.md) ~0.13.2
- [lodash](https://npm.io/package/lodash.md) ~3.7.0
- [radium](https://npm.io/package/radium.md) ~0.11.1
- [chroma-js](https://npm.io/package/chroma-js.md) ~0.7.2
- [classnames](https://npm.io/package/classnames.md) ~2.0.0

## Recent versions

- 0.0.7 (latest) — 2015-05-15
- 0.0.6 — 2015-05-15
- 0.0.3 — 2015-05-14
- 0.0.2 — 2015-05-14
- 0.0.1 — 2015-05-14

## README

#ReactJS Component Kit
========================
[![npm version](https://badge.fury.io/js/react-component-kit.svg)](http://badge.fury.io/js/react-component-kit)

[![Circle CI](https://circleci.com/gh/linmxy/react-component-kit/tree/master.svg?style=svg)](https://circleci.com/gh/linmxy/react-component-kit/tree/master)



Provide examples of how to implements all kinds of UI components using ReactJS.


## Install
    
    npm install react-component-kit

## Deployment

In order to be able to install to npm registry, I need to make the library can be used both front end and backend.
I can't use webpack to transpile ES6 code, because it will not generate usable node_module. so I choose grunt-bable plugin to do that.

I also want the docs code can deployed to heroku using grunt-connect server. so I add a postinstall scripts as follow:

    "postinstall": "(cd docs && npm install --ignore-scripts)"
    
and I need to add the main project as a local module in docs directory: 
    
    "react-component-kit": "file:../",
    
It take me lots of time to fixed the infinite loop because of reference issue: 
(install uikit) => (post install docs site) => (dependency install uikit) => ....
then I realized that I can add '--ignore-scripts' options to prevent the infinite loop. and finally I make the demo site deployed on heroku :)
  
    
Automatically update version and publish is a good thing for me. An simple solutions is add relsese script to you package.json: 
     
     "patch-release": "npm version patch && npm publish && git push --follow-tags"

##Components
###Basic usage

    import {Tab, TabPane} from 'react-component-kit';
    render(){
      return (
         <Tab activeKey="ui">
          <TabPane tabKey="ui" tabName="JUST THE UI">
            Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
          </TabPane>
          <TabPane tabKey="dom" tabName="VIRTUAL DOM">
            React abstracts away the DOM from you, giving a simpler programming model and better performance. React can also render on the server using Node, and it can power native apps using React Native.
          </TabPane>
          <TabPane tabKey="data-flow" tabName="DATA FLOW">
            React implements one-way reactive data flow which reduces boilerplate and is easier to reason about than traditional data binding.
          </TabPane>
        </Tab>   
      );
    }
   
   
##Css inline consideration
  
[vjeux: React: CSS in JS](https://speakerdeck.com/vjeux/react-css-in-js)

Css inline is good, but some of the most needed feature are hard to implements using this way:
  
  - :before/:after pseudo class
  
  - browser autoPrefix

I try to use inline for all basic ui components, but I think for business module, better still using some less/sass/stylus, but need better isolate solution, then require each module using webpack.

   
##heroku deployment

Config Vars

BUILDPACK_URL =https://github.com/mbuchetics/heroku-buildpack-nodejs-grunt.git

This demo/document project is host in heroku, using heroku-buildpack-nodejs-grunt build pack
grunt plugins are added to dependencies instead of devDependencies so that heroku can successfully deploy and run

---
_Source: https://npm.io/package/react-component-kit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
