Coder Social home page Coder Social logo

react-helper's Introduction

Arquitetura projetos em ReactJs

Vertical slices / Feature Driven Architecture

src |\_app # contains app-wide setup and layout that depends on all the other
folders |\_components |\_Layout |\_Providers |\_config -> configuration
variables |\_routes -> import pages and create routes |\_styles -> global styles
|\_store -> global store setup if usage with redux |\_rootReducer.ts |\_index.ts
|\_App.tsx -> composing app with providers and whatever is necessary for
initialization |\_index.ts -> expose App to main entry point to be rendered
|\_assets |\_components # global components
|\_features|modules|domains|containers |\_dashboard |\_components |\_constants
|\_contexts |\_hooks |\_requests |\_queries |\_types |\_utils |\_index.ts ->
this is the entry point to a feature, it serves as the public API |\_mocks #
mocks and handlers with msw |\_pages |\_DashboardPage |\_service |\_api ->
axios/fetch instance |\_query_client |\_sentry |\_etc... |\_shared # shared
functions grouped by domain |\_date |\_format-date.ts |\_format-hour.ts
|\_index.ts ## entry point file that renders the React component tree

Commitizen friendly

Installing Linters

  • yarn add commitizen @commitlint/config-conventional @commitlint/cli lint-staged husky -D
  • yarn add --dev --exact prettier
  • yarn add eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin -D
  • yarn commitizen init cz-conventional-changelog --save-dev --save-exact
  • yarn husky install
  • yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'
  • yarn husky add .husky/pre-commit 'yarn lint-staged' <<<<<<< HEAD
  • ... "scripts": { "postinstall": "husky install", "cm": "cz" }

  • .czrc .commitlintrc .lint ... "scripts": { "postinstall": "husky install", "cm": "cz" }

    50909ce (chore: adding linters)

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.