Giter Site home page Giter Site logo

react-components's Introduction

react-components

A collection of reusable React components with their own Flux lifecycle.

Bower version MIT License Build Status

Just getting your project started?

Try our Yeoman generator for testing, linting, watchers, and more!

generator-reactjs-flux for Facebook's React framework and Flux application architecture.

What's inside react-components?

Try the Demo

From a simple table to multi-column filtering, column sorting, row selection, client side pagination, and more.

Search against large sets of data, populate results, and take action with all the sweet hot keys your power users are after.

Display complex data with our pie chart's drill in/out functionality, hover animations, and result list.

A simple single page modal that renders in it's own DOM tree and operates outside the render cycles of an application.

A page level component that displays a confirmation dialog to the user with OK/Cancel buttons.

A page level component that animates in and out for success, error, warning, info, and custom messages.

Getting Started

Install Bower if it is not already installed

$ npm install -g bower

Bower Install react-components

$ bower install react-components --save

NPM Install react-components

$ npm install dataminr-react-components --save

Include the following in require config (alias names must match)

RequestHandler: 'path/to/RequestHandler',
drc: 'path/to/bower_components/react-components/src/compiled'

(Optional) Add mapping to require config to your Flux Dispatcher

This step is only necessary if you have your own Flux Dispatcher. Otherwise you can just use the built-in one in this library.

map: {
    "*":{
        "drc/dispatcher/AppDispatcher.min": "path/to/your/dispatcher"
    }
}

Add external style sheet

<link type="text/css" rel="stylesheet" href="/bower_components/react-components/dist/react-components.css" />

Submitting Issues

If you are submitting a bug, please create a jsfiddle demonstrating the issue if possible.

Contributing

Fork the library and follow the Install Dependencies steps below.
$ git clone https://github.com/dataminr/react-components.git
$ git checkout master

Important Notes

  • Pull requests should be made to the master branch with proper unit tests.
  • Do not include the minified files in your pull request. We build these when we tag a release.

We use the following libraries within our project

  • React JavaScript library for building user interfaces
  • Flux Application architecture for building user interfaces
  • Require JavaScript file and module loader optimized for in-browser use
  • lodash JavaScript utility library
  • Moment Parse, validate, manipulate, and display dates in JavaScript
  • jQuery Fast, small, and feature-rich JavaScript library
  • d3 Manipulate documents based on data with Data-Driven Documents
Style
  • Compass Css authoring framework
  • Sass CSS with superpowers
Unit testing and style checking
  • Jasmine Behavior-driven development framework for testing JavaScript code
  • Istanbul JavaScript statement, line, function, and branch code coverage when running unit tests
  • ESLint The pluggable linting utility for JavaScript and JSX

Install Dependencies

Node

node.js.org

Bower
$ npm install -g bower
Compass & Sass
$ gem install compass
Grunt command line interface
$ npm install -g grunt-cli
React tools
$ npm install -g react-tools
Finally, install third-party dependencies and start watchers:
$ cd ~/path/to/react-components/root
$ npm install
$ grunt init

Bower link react-components to work locally

$ cd ~/path/to/react-components/root
$ bower link
$ cd ~/path/to/project/root
$ bower link react-components

NPM Troubles? npm ERR! Are you seeing something like: Error: EACCES, mkdir '/Users/user/.npm/dargs/2.1.0' ? Try the following commands and try the previous step again:

$ cd ~
$ sudo chown -R $(whoami) .npm

If you find your css build results are empty, update your sass gem.

Use the sample app in your browser to develop

/react-components/src/js/examples/index.html

Grunt Tasks

The default grunt task will compile jsx and scss files as well as start a watcher for them.

$ grunt

Same as the default grunt task, however it will reinstall dependencies.

$ grunt init

Run Jasmine unit tests, JSHint, and JSCS

$ grunt test

Same as grunt test, however, this task will run code coverage and launch the code coverage in your browser.

$ grunt test:cov

Run unit tests in the browser on actual source rather than instrumented files from istanbul.

$ grunt jasmineDebug --filter {/folder|file}

Run unit tests for a filtered set of folders or files without code coverage thresholds.

$ grunt jasmineFilter --filter {/folder|file}

License

MIT

Special Thanks To:

The developers that made this project possible by contributing to the the following libraries and frameworks:

React, Flux, Compass, Sass, Require, Grunt, Jasmine, Istanbul, ESLint, Watch, d3, lodash, jQuery, and Moment

react-components's People

Contributors

dan-dunn avatar ernieturner avatar jasonjohnson115 avatar keara-haley avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.