1.0.0 • Published 10 months ago

brightlocal-boilerplate v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

React - Redux - RTK Query Boilerplate

About

This folder contains boilerplate - React.js application that resembles typical tech stack, folder structure and naming convention of standard BrightLocal React.js app.Boilerplate was created to make the process of creating new BrightLocal React.js applications faster and more consistent.Neither structure nor content of files are carved in stone. If you feel that this boilerplate is in desperate need of an update - don't be shy, just remember to ask your colleagues to review your changes

How to use boilerplate

I presume that the content of the boilerplate folder (both files and folders) should be copied and pasted into the folder where the new BrightLocal React.js application should grow. There can be a more elegant way to deploy it - feel free to suggest it. Just remember to put all changes to code review

Boilerplate structure

Root folder of boilerplate apart from this file has three more important files. Main app file (index.jsx), pdf version of app (pdf.jsx) and main store file (store.js). Pdf file is separated and does not use the store, so it can rely exclusively on data from the container. The Store file has setup for Redux Toolkit with RTK Query, as it is the most modern and mature among widely used React state management libraries. Rest of RTK files are in actions and reducers folders. components folder is one that holds components (not a lot of creativity here), constants, helpers and utils are suggested folders where one should keep shared hardcoded data (like common action names, etc.), helper functions and other stuff that helps us to write DRY (Don't Repeat Yourself) code. If you find any of these folders useless in your project - please clean them up. Again - nothing here is carved in stone. You are writing your code - so you are the boss after all

Changelog

I suggest that for sanity sake we should fill this section with major changes over the boilerplate - hopefully - long and happy life.

Happy hacking! Yurko Piddubnyak aka Jurko Banzaj. BrightLocal, 2023

1.0.0

10 months ago