Git Product home page Git Product logo

react-app-template's Introduction

Logo

React-Redux Tailwind & Styled-Components Boilerplate

A React-Redux and Tailwind CSS / Styled Components boilerplate for any future project

These technologies were used:

๐Ÿ“– Documentation

Folder Structure

This boilerplate has been set up with React, Tailwind, Redux, and React-Router

React

The React components are subdivided between two folders, ./componentsand ./containers. Generally, containers refer to "smart" components and components refers to "dumb" components. Dumb here meaning stateless or re-usable.

I generally use the containers folder to have my main pages './HomePageContainer', './AboutPageContainer', etc. and keep all the re-usable components that compose these containers in the components folder.

When the project grows, the folder structure is usually re-organized for all the related components to be grouped together in new folders.

Styled Components

Kept Styled Components here in case there are specific re-usable components that we are going to need throughout the application. Might remove it later if necessary and if the bundle size of the application is too large.

Tailwind CSS

Tailwind CSS is a great library for quick iteration and fast development. It's a CSS fraework packed with classes like flex, pt-4, text-center, etc. that allows us to make styling a faster process.

React-Router

The routes are all stored in the Routes.js file of the ./routing folder. There, you'll find two special components

  1. UnauthenticatedRoute --> Routes that don't require the user to be logged in to be displayed
  2. AuthenticatedRoute --> Routes that require the user to be logged in to be displayed

The Authentication state is stored in the authentication reducer in the Redux store. It is passed down as a prop to the App.js component. Any call to the reducer with the respective action creator will trigger the isAuthenticated state to change and will show or hide components accordingly.

Action Creators

Actions creator functions are all stored in the ./actionCreators file

Reducers

Finally, the reducers are all in the ./reducers file, which for now contains one reducer, the authentication reudcer.

๐Ÿ›  Installation & Set Up

  1. Clone the GitHub repository

    git clone https://github.com/AdewaleAdeniji/react-app-template.git
    
  2. Run npm install

  3. Start coding.

Why โ›ฉ

Setting the boilerplate of a project usually takes away from the momentum of a good idea. Lost momentum might lead to a loss in productivity. More importantly, lost momentum is simply lost energy, lost positivity, it's just annoying. I don't need this in my life. This should allow me to jump start any project in the future.

react-app-template's People

Stargazers

Ayano Ifeoluwa Emmanuel avatar

Watchers

James Cloos avatar Spiderman 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.