Skip to content

This project depicts best react recipes you can follow to make your react project better

Notifications You must be signed in to change notification settings

suwigyarathore/react-best-recipes

Repository files navigation

react-best-recipes

This project depicts various best react recipes that if you follow in enterprise level React projects it will be easy to maintain coding standards, testing, CSS scaling, pretty code etc

Application Screenshots

Screenshot

Good Recipes Followed

  • Setting up babel
  • Setting up webpack
  • Setting up dev env with webpack dev server and prod webpack config
  • Setting up babel-loader for react and writing functional component
  • Imporing assets by file loader
  • Using fetch to make async calls
  • Complex communication between components
  • Passing function inside child components
  • Exploiting State API
  • Using babel-preset-stage-0 for replacing ugly bind
  • Setup postcss and basscss
  • Apply and adapt tp basscss style gide to our site
  • Setting up linter with ESlint using airbnb standards
  • Setting up Prettier for rewriting code better
  • Setting up githook for linter and prettier
  • Setting up basic routes with browser router
  • Adding route switch and not found route
  • Marking Recipes as favorite
  • Sharing state between 2 components
  • Getting parameters from URL

Unit Testing

  • Jest Configured
  • Snapshot testing with jest
  • Adding static assets mocks

Complex Scenario Testing

  • Using Enzyme to test complex scenarios like when DOM clicked
  • Uning mount renderer for enzyme for full rendering
  • Simulating clicks and verifying clicks
  • Finding DOM elements using find & first api of enzyme

About

This project depicts best react recipes you can follow to make your react project better

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published