LearnVerse is a platform to help publish online courses and enhance the learning journey.
app
directory is for the Routes that translate to actual pages in the application.components
is for all components in the applications.services
is for data fetching logic.hooks
is for custom React hooks.constants
is for shared Global variables.
- Variables => Camel Case
learnVerse instead of learn_verse
- Constants => ALL upper case
LEARNVERSE or LEARN_VERSE
- Components => React components have to start with an upper case letter
Header not header
- please use lowercase for all folders or directories in the source code.
please use double quotes "learn verse"
instead of single ones 'learn verse'
you can install The Prettier VS Code plugin to do that automatically Prettier
- Prettier Prettier
- Auto Close Tag Auto Close Tag
- Auto Rename Tag Auto Rename Tag
- ESLint ESLint
- ES7+ React/Redux/React-Native snippets React Snippets
- JavaScript and TypeScript Nightly TypeScript Nightly
- Tailwind Docs Tailwind
- Import Cost Import Cost
for consistency and simplicity always prefer the Arrow function.
const printHello => () => {
console.log("Hello Learn Verse");
};
instead of
function printHello() {
console.log("Hello Learn Verse");
}
Outside the app directory
don't use default exports.
export const printHello => () => {
console.log("Hello Learn Verse");
};
instead of
const printHello => () => {
console.log("Hello Learn Verse");
};
export default printHello;
DO NOT use var! ❌❌❌
var title = "Learn Verse";
- Prefer using
const
whenever possible unless the variable needs to change, in that case uselet
;
const GRADUATION_YEAR = 2024;
let daysRemaining = 90;
@EveryMorning
daysRemaining = daysRemaining - 1 // or daysRemaining--
Pushing directly to the master
branch is considered risky and bad practice.
Thus unless it's a small commit
, please create a new branch, make changes, commit changes, push the new branch with the changes and finally open a pull request.
Before creating a new branch, please make sure you are on the master
branch.
$ git checkout master
Switched to branch 'master'
Please make sure your local repo has the recent commits,
$ git pull
after that, create a new branch,
hotfix
here is the name of the new branch, feel free to name the branch whatever you want.
$ git checkout -b hotfix
Switched to a new branch 'hotfix'
Make all the changes required,
When pushing the code, do the following
Add Command
$ git add .
Commit Command
$ git commit -m "hot fixed done"
Push Command
$ git push origin hotfix
Please don't merge your pull requests, Ask another team member to review your code changes and then he can merge it if accepted by the Reviewer.