Code Monkey home page Code Monkey logo

react-boilerplate's Introduction

RB

Core features

  • ESlint
  • Jest & Enzyme
  • PropTypes
  • Pre-commit
  • Prettier
  • CSS loader & styled-components
  • Environment variables
  • Automated Heroku deployment flow

How to use?

Start off by cloning the project.

git clone https://github.com/gomorizsolt/react-boilerplate.git

Install dependencies.

npm install

Launch the development environment. ๐Ÿš€

npm run dev

Contribution

Contributors are welcome and also expected to adhere to the Contributor Covenant.

License

The project is under the MIT license. For more information read the LICENSE.md file.

react-boilerplate's People

Contributors

dependabot[bot] avatar gomorizsolt avatar hinsxd 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

Watchers

 avatar  avatar

react-boilerplate's Issues

Testing custom hooks

It'd be nice to provide some examples that demonstrates the way of testing custom React hooks. It can also be documented as part of #33.

Enable dynamic imports

The project doesn't allow using dynamic imports. It's a huge issue whenever someone is about to use lazy loading.

To resolve the issue:

  • install babel-dynamic-import plugin,
  • also add babel-eslint so that get rid of the parsing error,
  • create an example inside Examples to ensure that it works as expected.

Update / extend badges

Let's use the fancy badges in the README. Required ones:

  • build passes/fails,
  • test coverage.

Unfortunately, CircleCI doesn't support displaying the coverage badge by default. As a result, it might be reasonable to move to another provider - TravisCI is the preferable one along with Coveralls as the setup is quite straightforward.

presets in .babelrc vs webpack config

What is the advantage of putting babel presets in a .babelrc.

{
    "presets": ["@babel/preset-env", "@babel/preset-react"],

or including them in webpack config in the modules section?

{
            test: /\.js$/i,
            use: [
                { 
                    loader: 'babel-loader',
                    options: { presets: ['@babel/env', '@babel/react'] }
                }
            ],

useFetch hook

Create a useFetch hook that comprises the following elements:

  • provides an abstract interface that handles the data fetching and parsing,
  • uses the built-in JS fetch(it might be different based on the users' preferences),
  • sets an isLoading property to false/true based on the process.

Example gist.

Documentation

Let's adapt a comprehensive documentation to the project that contains:

  • installation / setup,
  • configurations,
  • frameworks.

TODOs:

  • investigate docz and mdx,
  • setup auto-deployment on a specific branch(?).

Setup TravisCI

Extracted from #27.

Referring to the specified issue above, create a free plan on TravisCI and also setup the same building blocks as before:

  • test coverage,
  • lint.

ESlint plugin for React hooks

The React team has just released the official hooks plugin. It seemingly in the stable version, thus adapt it to the boilerplate.

Extend scripts in package.json

The script property of package.json might be extended with other useful ones:

  • test:watchAll to run all the tests and "keep an eye" on them,
  • test:coverage to display the result of the coverage measurement along with the amount of passed/not passed tests,
  • test:only to run all the tests without any specific impact.

Proposals are welcome.

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.