├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin └── generate-project.js ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.js ├── App.test.js ├── common │ └── NavBar │ │ └── index.js ├── index.css ├── index.js ├── reportWebVitals.js ├── screens │ ├── AboutUsPage │ │ ├── index.css │ │ └── index.js │ ├── HomePage │ │ ├── index.css │ │ └── index.js │ └── LoginPage │ │ ├── index.css │ │ └── index.js └── setupTests.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | # Change Log 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). 6 | 7 | ## [1.0.3] - 2022-05-10 8 | 9 | ### Fixed 10 | - Fix: Upgrade package dependancies 11 | - Fix: Security issues in dependancies 12 | - Fix: Broken links in the documentation to the pre configured packages 13 | 14 | ## [1.1.0] - 2022-05-11 15 | 16 | ### Fixed 17 | - Fix: Incompatible issue with chalk-animation 18 | - Fix: Bump deprecated Node.js methods 19 | - Fix: Upgrade MUI version 20 | 21 | ## [1.2.0] - 2023-10-22 22 | 23 | ### Fixed 24 | - Feature: Add a Bulma Navbar Template 25 | - Enhancement: Remove npm usage with yarn -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | 8 | ## Pull Request Process 9 | 10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a 11 | build. 12 | 2. Update the README.md with details of changes to the interface, this includes new environment 13 | variables, exposed ports, useful file locations and container parameters. 14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this 15 | Pull Request would represent. 16 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you 17 | do not have permission to do that, you may request the second reviewer to merge it for you. 18 | 19 | ## Code of Conduct 20 | 21 | ### Our Pledge 22 | 23 | In the interest of fostering an open and welcoming environment, we as 24 | contributors and maintainers pledge to making participation in our project and 25 | our community a harassment-free experience for everyone, regardless of age, body 26 | size, disability, ethnicity, gender identity and expression, level of experience, 27 | nationality, personal appearance, race, religion, or sexual identity and 28 | orientation. 29 | 30 | ### Our Standards 31 | 32 | Examples of behavior that contributes to creating a positive environment 33 | include: 34 | 35 | * Using welcoming and inclusive language 36 | * Being respectful of differing viewpoints and experiences 37 | * Gracefully accepting constructive criticism 38 | * Focusing on what is best for the community 39 | * Showing empathy towards other community members 40 | 41 | Examples of unacceptable behavior by participants include: 42 | 43 | * The use of sexualized language or imagery and unwelcome sexual attention or 44 | advances 45 | * Trolling, insulting/derogatory comments, and personal or political attacks 46 | * Public or private harassment 47 | * Publishing others' private information, such as a physical or electronic 48 | address, without explicit permission 49 | * Other conduct which could reasonably be considered inappropriate in a 50 | professional setting 51 | 52 | ### Our Responsibilities 53 | 54 | Project maintainers are responsible for clarifying the standards of acceptable 55 | behavior and are expected to take appropriate and fair corrective action in 56 | response to any instances of unacceptable behavior. 57 | 58 | Project maintainers have the right and responsibility to remove, edit, or 59 | reject comments, commits, code, wiki edits, issues, and other contributions 60 | that are not aligned to this Code of Conduct, or to ban temporarily or 61 | permanently any contributor for other behaviors that they deem inappropriate, 62 | threatening, offensive, or harmful. 63 | 64 | ### Scope 65 | 66 | This Code of Conduct applies both within project spaces and in public spaces 67 | when an individual is representing the project or its community. Examples of 68 | representing a project or community include using an official project e-mail 69 | address, posting via an official social media account, or acting as an appointed 70 | representative at an online or offline event. Representation of a project may be 71 | further defined and clarified by project maintainers. 72 | 73 | ### Enforcement 74 | 75 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 76 | reported by contacting the project team at [INSERT EMAIL ADDRESS]. All 77 | complaints will be reviewed and investigated and will result in a response that 78 | is deemed necessary and appropriate to the circumstances. The project team is 79 | obligated to maintain confidentiality with regard to the reporter of an incident. 80 | Further details of specific enforcement policies may be posted separately. 81 | 82 | Project maintainers who do not follow or enforce the Code of Conduct in good 83 | faith may face temporary or permanent repercussions as determined by other 84 | members of the project's leadership. 85 | 86 | ### Attribution 87 | 88 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 89 | available at [http://contributor-covenant.org/version/1/4][version] 90 | 91 | [homepage]: http://contributor-covenant.org 92 | [version]: http://contributor-covenant.org/version/1/4/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Suvin Nimnaka 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Javascript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black) ![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB) ![npm version](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white) ![npm version](https://img.shields.io/github/followers/suvink.svg?style=social&label=Follow&maxAge=2592000) 2 | 3 |

4 | 5 | Logo 6 | 7 | 8 |

Let Me React v1.0.3

9 | 10 |

11 | A Simple ReactJS Boilerplate :) 12 |
13 | Explore the docs » 14 |
15 |
16 | View Repo 17 | · 18 | Report Bug 19 | · 20 | Request Feature 21 |

22 |

23 | 24 | ## About 25 | 26 | Write your React App easily with Let Me React! This is similar to `create-react-app` but LMR will comes with useful packages like `react-router-dom`,`Axios`, `SweetAlert2` pre-configured so that you can dive into writing your code without having to worry about setting up the project. 27 | 28 | ## Prerequisites 29 | 30 | This project requires NodeJS (version 8 or later) and NPM. 31 | [Node](http://nodejs.org/) and [NPM](https://npmjs.org/) are really easy to install. 32 | To make sure you have them available on your machine, 33 | try running the following command. 34 | 35 | ```sh 36 | $ npm -v && node -v 37 | 6.4.1 38 | v8.16.0 39 | ``` 40 | 41 | 42 | ## Installation 43 | 44 | **BEFORE YOU INSTALL:** please read the [prerequisites](#prerequisites) 45 | 46 | 47 | ```sh 48 | $ npm install -g let-me-react 49 | ``` 50 | 51 | After installation, use can use the following command to initialize your project. 52 | 53 | ```sh 54 | $ let-me-react myproject 55 | ``` 56 | 57 | Alternatively, you can use `npx` to directly use `let-me-react` without installing globally. 58 | 59 | ```sh 60 | $ npx let-me-react myproject 61 | ``` 62 | 63 | ## Usage 64 | After initializing your project, you can use the following scripts. 65 | ### Serving the app 66 | 67 | ```sh 68 | $ npm start 69 | ``` 70 | Runs the app in the development mode. Open http://localhost:3000 to view it in the browser. The page will hot reload as you make edits. 71 | 72 | ### Running the tests 73 | 74 | ```sh 75 | $ npm test 76 | ``` 77 | Launches the test runner in the interactive watch mode. See the section about running tests for more information. 78 | ### Building a distribution version 79 | 80 | ```sh 81 | $ npm run build 82 | ``` 83 | 84 | Builds the app for production and files are saved to the build folder. It bundles your files in production mode and optimizes the build for the best performance. The build is minified and the filenames include hashes. 85 | 86 | Your app is ready to be deployed! 87 | 88 | ## Pre-Configured Plugins 89 | - Bulma CSS : a free, open source framework that provides ready-to-use frontend components that you can easily combine to build responsive web interfaces. 90 | - Sweetalert 2: A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies. 91 | - Axios: an HTTP client library that allows you to make requests to a given endpoint. 92 | - Notistack: a notification library which makes it extremely easy to display notifications on your web apps. 93 | 94 | 95 | ## Contributing 96 | 97 | Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. 98 | 99 | 1. Fork the Project 100 | 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 101 | 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 102 | 4. Push to the Branch (`git push origin feature/AmazingFeature`) 103 | 5. Open a Pull Request 104 | 105 | ## Donations 106 | Buy Me A Coffee 107 | 108 | ## License 109 | [MIT License](https://andreasonny.mit-license.org/2019) © Suvin Nimnaka 110 | 111 | ## Contact 112 | 113 | Suvin Nimnaka - [@tikirimaarie](https://twitter.com/tikirimaarie) - hello@suvin.me 114 | Project Link: [https://github.com/Suvink/let-me-react](https://github.com/Suvink/let-me-react) 115 | 116 | -------------------------------------------------------------------------------- /bin/generate-project.js: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env node 2 | 3 | "use strict"; 4 | 5 | const path = require("path"); 6 | const util = require("util"); 7 | const packageJson = require("../package.json"); 8 | const chalkAnimation = require("chalk-animation"); 9 | const fs = require("fs"); 10 | var figlet = require("figlet"); 11 | const exec = util.promisify(require("child_process").exec); 12 | let newPackage = {}; 13 | 14 | async function runCmd(command) { 15 | try { 16 | const { stdout, stderr } = await exec(command); 17 | console.log(stdout); 18 | console.log(stderr); 19 | } catch { 20 | (error) => { 21 | console.log("\x1b[31m", error, "\x1b[0m"); 22 | }; 23 | } 24 | } 25 | 26 | if (process.argv.length < 3) { 27 | console.log("\x1b[31m", "You have to provide name to your app."); 28 | console.log("For example:"); 29 | console.log(" npx let-me-react my-app", "\x1b[0m"); 30 | process.exit(1); 31 | } 32 | 33 | const ownPath = process.cwd(); 34 | const folderName = process.argv[2]; 35 | const appPath = path.join(ownPath, folderName); 36 | const repo = "https://github.com/Suvink/let-me-react.git"; 37 | 38 | try { 39 | fs.mkdirSync(appPath); 40 | } catch (err) { 41 | if (err.code === "EEXIST") { 42 | console.log( 43 | "\x1b[31m", 44 | `The file ${appName} already exist in the current directory, please give it another name.`, 45 | "\x1b[0m" 46 | ); 47 | } else { 48 | console.log(err); 49 | } 50 | process.exit(1); 51 | } 52 | 53 | async function setup() { 54 | try { 55 | const rainbow = chalkAnimation.karaoke( 56 | "⬇️ Downloading the project structure... So පොඩ්ඩක් ඉඳපන්! " 57 | ); 58 | rainbow.start(); 59 | await runCmd(`git clone --depth 1 ${repo} ${folderName}`); 60 | rainbow.stop(); 61 | process.chdir(appPath); 62 | 63 | fs.unlinkSync(path.join(appPath, "LICENSE")); 64 | fs.unlinkSync(path.join(appPath, "README.md")); 65 | fs.rmSync(path.join(appPath, "bin"), { recursive: true }); 66 | fs.unlinkSync(path.join(appPath, "package.json")); 67 | fs.unlinkSync(path.join(appPath, "yarn.lock")); 68 | fs.unlinkSync(path.join(appPath, "CHANGELOG.md")); 69 | 70 | console.log("\x1b[36m", "⌛ Creating a new package...", "\x1b[0m"); 71 | await buildPackageJson(packageJson, folderName); 72 | 73 | const karoke = chalkAnimation.karaoke("⌛ Installing dependencies..."); 74 | karoke.start(); 75 | await runCmd("yarn install"); 76 | karoke.stop(); 77 | console.log(); 78 | 79 | await runCmd("npx rimraf ./.git"); 80 | 81 | figlet("READY!", function (err, data) { 82 | if (err) { 83 | return; 84 | } 85 | console.log(data); 86 | }); 87 | console.log( 88 | "\x1b[32m", 89 | "✅ The installation is done, You may React Now! That means ගිහින් වැඩ කරපන්!", 90 | "\x1b[0m" 91 | ); 92 | console.log(); 93 | 94 | console.log("\x1b[33m", "You can start by typing:"); 95 | console.log(` cd ${folderName}`); 96 | console.log(" npm start", "\x1b[33m"); 97 | console.log(); 98 | console.log("Check README.md for more information"); 99 | console.log(); 100 | } catch (error) { 101 | console.log(error); 102 | } 103 | } 104 | 105 | setup(); 106 | 107 | async function buildPackageJson(packageJson, folderName) { 108 | newPackage = { 109 | name: folderName, 110 | version: "1.0.0", 111 | description: "A sample ReactJS App Created with Let-Me-React", 112 | author: "", 113 | license: "ISC", 114 | scripts: { 115 | start: "react-scripts start", 116 | build: "react-scripts build", 117 | test: "react-scripts test", 118 | eject: "react-scripts eject", 119 | }, 120 | dependencies: { 121 | "@emotion/react": "^11.9.0", 122 | "@emotion/styled": "^11.8.1", 123 | "@mui/material": "^5.7.0", 124 | "@testing-library/jest-dom": "^5.16.4", 125 | "@testing-library/react": "^13.2.0", 126 | "@testing-library/user-event": "^13.5.0", 127 | bulma: "^0.9.4", 128 | notistack: "^2.0.4", 129 | react: "^18.1.0", 130 | "react-dom": "^18.1.0", 131 | "react-router-dom": "^5.2.0", 132 | "react-scripts": "5.0.1", 133 | sweetalert2: "^11.4.13", 134 | "web-vitals": "^2.1.4", 135 | axios: "^0.27.2", 136 | }, 137 | browserslist: { 138 | production: [">0.2%", "not dead", "not op_mini all"], 139 | development: [ 140 | "last 1 chrome version", 141 | "last 1 firefox version", 142 | "last 1 safari version", 143 | ], 144 | }, 145 | }; 146 | 147 | fs.writeFileSync( 148 | `${process.cwd()}/package.json`, 149 | JSON.stringify(newPackage, null, 2), 150 | "utf8" 151 | ); 152 | } 153 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "let-me-react", 3 | "version": "1.2.0", 4 | "description": "A simple ReactJS Boilerplate :)", 5 | "dependencies": { 6 | "@material-ui/core": "^4.12.1", 7 | "@testing-library/jest-dom": "^5.11.4", 8 | "@testing-library/react": "^11.1.0", 9 | "@testing-library/user-event": "^12.1.10", 10 | "axios": "^0.21.1", 11 | "bulma": "^0.9.2", 12 | "chalk-animation": "^1.6.0", 13 | "figlet": "^1.5.0", 14 | "notistack": "^1.0.9", 15 | "react": "^17.0.2", 16 | "react-dom": "^17.0.2", 17 | "react-router-dom": "^5.2.0", 18 | "react-scripts": "^5.0.1", 19 | "sweetalert2": "^11.0.18", 20 | "web-vitals": "^1.0.1" 21 | }, 22 | "repository": { 23 | "type": "git", 24 | "url": "git+https://github.com/Suvink/let-me-react.git" 25 | }, 26 | "keywords": [ 27 | "Boilerplate", 28 | "React", 29 | "Javascript" 30 | ], 31 | "author": "Suvin Nimnaka", 32 | "license": "ISC", 33 | "bugs": { 34 | "url": "https://github.com/Suvink/let-me-react/issues" 35 | }, 36 | "homepage": "https://github.com/Suvink/let-me-react#readme", 37 | "scripts": { 38 | "start": "react-scripts start", 39 | "build": "react-scripts build", 40 | "test": "react-scripts test", 41 | "eject": "react-scripts eject" 42 | }, 43 | "eslintConfig": { 44 | "extends": [ 45 | "react-app", 46 | "react-app/jest" 47 | ] 48 | }, 49 | "browserslist": { 50 | "production": [ 51 | ">0.2%", 52 | "not dead", 53 | "not op_mini all" 54 | ], 55 | "development": [ 56 | "last 1 chrome version", 57 | "last 1 firefox version", 58 | "last 1 safari version" 59 | ] 60 | }, 61 | "bin": { 62 | "let-me-react": "./bin/generate-project.js" 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suvink/let-me-react/32260d9de21af988c5042972b552224ab33dac74/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suvink/let-me-react/32260d9de21af988c5042972b552224ab33dac74/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suvink/let-me-react/32260d9de21af988c5042972b552224ab33dac74/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | BrowserRouter as Router, 4 | Switch, 5 | Route, 6 | } from "react-router-dom"; 7 | import HomePage from './screens/HomePage'; 8 | import LoginPage from './screens/LoginPage'; 9 | import AboutUsPage from './screens/AboutUsPage'; 10 | 11 | function App() { 12 | return ( 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ); 27 | } 28 | 29 | export default App; 30 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/common/NavBar/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useState } from "react"; 3 | 4 | const NavBar = () => { 5 | const [isActive, setisActive] = useState(false); 6 | 7 | const routes = [ 8 | { 9 | href: "/", 10 | label: "Home", 11 | }, 12 | { 13 | href: "/about", 14 | label: "About", 15 | }, 16 | ]; 17 | 18 | return ( 19 | 61 | ); 62 | }; 63 | 64 | export default NavBar; 65 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | /* Import Poppins Font */ 2 | @import url("https://fonts.googleapis.com/css?family=Poppins:400,500,300,200,700"); 3 | /* Import Font Awesome */ 4 | @import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css"); 5 | /* Import Animate CSS */ 6 | @import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css'); 7 | 8 | body { 9 | margin: 0; 10 | font-family: Poppins, "Helvetica Neue", sans-serif; 11 | -webkit-font-smoothing: antialiased; 12 | -moz-osx-font-smoothing: grayscale; 13 | } 14 | 15 | code { 16 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 17 | monospace; 18 | } 19 | 20 | /* Color Palette */ 21 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import "./index.css"; 4 | import App from "./App"; 5 | import { SnackbarProvider } from "notistack"; 6 | import reportWebVitals from "./reportWebVitals"; 7 | import "bulma/css/bulma.min.css"; 8 | import NavBar from "./common/NavBar"; 9 | 10 | ReactDOM.render( 11 | 12 | 13 | 14 | 15 | 16 | , 17 | document.getElementById("root") 18 | ); 19 | 20 | // If you want to start measuring performance in your app, pass a function 21 | // to log results (for example: reportWebVitals(console.log)) 22 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 23 | reportWebVitals(); 24 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/screens/AboutUsPage/index.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suvink/let-me-react/32260d9de21af988c5042972b552224ab33dac74/src/screens/AboutUsPage/index.css -------------------------------------------------------------------------------- /src/screens/AboutUsPage/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import './index.css'; 3 | 4 | function AboutUsPage() { 5 | return ( 6 |

This is your About Us Page

7 | ); 8 | } 9 | 10 | export default AboutUsPage; 11 | -------------------------------------------------------------------------------- /src/screens/HomePage/index.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suvink/let-me-react/32260d9de21af988c5042972b552224ab33dac74/src/screens/HomePage/index.css -------------------------------------------------------------------------------- /src/screens/HomePage/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import './index.css'; 3 | 4 | function HomePage() { 5 | return ( 6 |

This is your Homepage

7 | ); 8 | } 9 | 10 | export default HomePage; 11 | -------------------------------------------------------------------------------- /src/screens/LoginPage/index.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suvink/let-me-react/32260d9de21af988c5042972b552224ab33dac74/src/screens/LoginPage/index.css -------------------------------------------------------------------------------- /src/screens/LoginPage/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import './index.css'; 3 | 4 | function LoginPage() { 5 | return ( 6 |

This is your LoginPage

7 | ); 8 | } 9 | 10 | export default LoginPage; 11 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | --------------------------------------------------------------------------------