GithubHelp home page GithubHelp logo

totominc / bookshelf-react Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 249 KB

React exercice projet by creating a Bookshelf web-application.

JavaScript 5.30% HTML 1.64% TypeScript 92.65% CSS 0.41%

bookshelf-react's Introduction

Bookshelf React - Real-world React project exercise

Building a full React application with React ecosystem.

Setup the project locally

Prerequesites

  • NodeJS LTS (tested with v14.18.0)
  • npm v6 or greater
  • Yarn v1 (project created with Yarn, we recommend using it instead of npm)

Setup local environment

Make sure to clone the repository locally. You can make a fork first, before cloning, if you want to make changes.

Run the following commands to clone the repository and install the dependencies:

# Replace this URL with your fork if you have done it.
# This URL will not let you push changes to my repository.
git clone https://github.com/TotomInc/bookshelf-react.git

cd bookshelf-react

# Install project dependencies with Yarn.
yarn install

Running the app

To get the app running in development mode, run:

yarn run dev

# You should see an URL that points to your local environment server.

The app is also deployed with a production build on react-bookshelf-exercise.netlify.app, thanks to Netlify.

Unit-tests

Make sure to create/update unit-tests when making changes.

This project is using jest and @testing-library/react to encourage good practices for unit-testing: it helps to write tests that resemble the way the software/website is used by clients.

Generally tests are created alongside components with a .spec.tsx file-extension.

You can run the following commands for unit-tests:

# Run unit-tests
yarn run test

# Run unit-tests in watch mode (like HMR but for Jest)
yarn run test:watch

# Run tests and generate a code-coverage
yarn run test:coverage

Linting (ESLint)

This project have an enforced ESLint config that cover TypeScript to React (hooks) and code-styling with Prettier and unit-testing. It integrates very well in VS Code dans can auto-fix ESLint warnings/errors when saving files.

The ESLint config used is from @totominc/eslint-config-react.

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.