Giter Site home page Giter Site logo

react-cheat-sheet's Introduction

React Cheat Sheet

CircleCI All Contributors

Contributing

Setup

react-cheat-sheet is a pretty standard create-react-app app. If you're fimiliar with a CRA app, everything should make sense.

Clone, setup, and run the project

git clone https://github.com/chantastic/react-cheat-sheet.git
cd react-cheat-sheet
yarn
yarn start

Yarn scripts

Command Description
start starts a webpacks sever at localhost:3000
test runs tests using Jest
prettier reformats all code using prettier
add-contribs adds a contributer to all-contributorsrc
generate-contribs generates a list of contributors on the README

Minor changes

Changing an example is easy.

Find the file with the error and click the Pencil button (Edit this file). Make your changes and commit in the browser. Github will do the rest for you. I'll get notified and the change will be fixed on the next deploy.

Major changes

  • Fork
  • Make Change
  • Run yarn add-contribs add yourself as a contributer.
  • Run yarn generate-contribs to generate an updated README.
  • PR back into chantastic:master

Contributors

Thanks goes to these wonderful people (emoji key):


Michael Chan


Jon Stuebe


Ted Pennings


James Miller


Eugene Zhlobo


Dan Abramov


Alexander Burtsev


Shrayas Rajagopal


Christopher Miller

This project follows the all-contributors specification. Contributions of any kind welcome!

react-cheat-sheet's People

Contributors

albburtsev avatar bensie avatar chantastic avatar cs-miller avatar dependabot[bot] avatar eatspaint avatar gaearon avatar jonstuebe avatar lxpvlv avatar shrayasr avatar tedpennings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-cheat-sheet's Issues

componentDidMount and componentDidUpdate similarity

For some reason I have the hardest time remembering where to put "react is done, have at with DOM changes" stuff.

componentDidMount() and componentDidUpdate() have equivalent DOM state and are the place for this. Very often you do the same stuff in these two, would be cool if the entry for these two in the cheat sheet indicated that.

Just an idea...if you're not into it no biggie.

Failed to compile -- Module not found: [CaseSensitivePathsPlugin]

Context: Windows 8

After following all the instructions in the ReadMe file I got the following error message:

Failed to compile.

Error in ./src/data.js
Module not found: [CaseSensitivePathsPlugin] D:\sandbox\react-cheat-sheet\src\data\misc.js does not match the corresponding path on disk Misc.js.

@ ./src/data.js 27:12-34

ESNext Syntax

I'm looking for resources for people who want to learn React and this looks great...nice React cheat sheet!

What would you think about adding the ESNext API? The reason I ask is that I searched for PropTypes and noticed this:

propTypes: {
  myProp: React.PropTypes.bool
}

// not available with React.Component

With ESNext and ReactComponent it should be:

  static propTypes = {
  myProp: React.PropTypes.bool
  }

I typically recommend Babel stage 0 for React projects since it makes using React even easier (IMHO).

If you agree, not sure the best way to integrate it. Could be a radio button, side-by-side comparison or a search checkbox? If not, no worries...

List Version Number

This is great! Thanks for creating.

It would be helpful to list the version of React this represents in the UI.

Generically handle category filters.

Right now, every category filter is hard-wired because copy/paste is easier than thinking. And I really wanted to pull the trigger. But now, it should just be done the right way.

Lifecycle method table does not fit horizontally

Hey,

love your cheatsheet! I noticed that the lifecycle methods table does not fit into the 720px wide container, and additionally does not scroll horizontally.

I could either increase the maxWidth of the <main> container or allow the container to overflow-x: auto; (or both?)

Let me know what you think.

`shouldComponentUpdate` description error

I think there is a mistake in description for shouldComponentUpdate

// invoked before rendering with new props, not for initial 'render'

Doc says, it's invoked with new state as well.

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.