GithubHelp home page GithubHelp logo

oscarvelandia / opinionated-nextjs-config-with-rtk Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 510 KB

Base config for a nextjs project with redux and eslint

JavaScript 27.54% TypeScript 48.26% SCSS 24.20%

opinionated-nextjs-config-with-rtk's Introduction

This is a Next.js project with RTK (Redux Toolkit), Typescript, Prettier and ESLint (with airbnb style guide) already configured.

Getting Started

  1. Clone the repository
  2. Run rm -rf .git to delete the git information of the repository
  3. Run git init to start a new Git repository
  4. Update the package.json name property
  5. Run yarn to install dependencies
  6. Enjoy

Project folder config

The resolver of every folder is @folderName, E.G. @features imports the files in the features folder, don't forget add the export of every file in index.tsx

  • components

    Folder with every React component with their corresponding [componentName].module.scss.

  • features

    Folder with every feature with a RTK slice and feature components slice, as a convention the name of every slice is featureName + Slice suffix, E.G. counterSlice.ts.

    In the counterSlice.ts file is a slice example.

  • hooks

    Folder with the custom react hooks.

  • pages

    Folder with every NextJs page.

  • services

    Folder with every RTK Query Api config and queries, is needed just one file per endpoint.

    In the pokemonApi.ts file is a service example.

  • store

    Folder with the hooks to wrap a typed useDispatch and useSelector and the store config with RTK Query middleware and reducer added.

  • styles

    Folder with the global CSS file

  • util

    Folder with the util functions, add one util per file.

opinionated-nextjs-config-with-rtk's People

Contributors

oscarvelandia avatar

Watchers

 avatar  avatar

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.