This app uses a React front-end and combines it with a Rails back-end to display a random message
Enjoy your Greeting!
- PostgreSQL
- React-Back-End API
- REACT
- REDUX
- Thunk
- Milestone 1: Create a new React app called 'hello-react-front-end'
- Milestone 2: Initialize your project with Git
- Milestone 3: Create the App component with react-router
- Milestone 4: Create the Greeting component that displays a greeting. - Set it up as a route in App component.
- Milestone 5: Create a store, an action and a reducer that connects to the API endpoint to get the random greeting
- Milestone 6: Display the random greeting in the Greeting component
To get a local copy up and running follow these simple example steps.
- Text Editor | Git and Github set up
In your terminal, navigate to your current directory and run this code
git clone https://github.com/steveWDamesJr/hello-react-front-end.git
Then run:
cd hello-react-front-end
Open the project in your favorite code editor. code .
for VS Code.
- Run npm install - to load necessary files from package.json
- Apply Linter checks with the following instructions
-
Stylelint: Install stylelint for clean Styles and elimination of related errors. Run:
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
Afterwards create a.stylelintrc.json
file and then runnpx stylelint "**/*.{css,scss}"
to check errors. Usenpx stylelint "**/*.{css,scss}" --fix
to fix multiple errors. -
Eslint: To find and fix script errors, run
npm install --save-dev eslint@7.x eslint-config-airbnb@18.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@4.x @babel/eslint-parser@7.x @babel/core@7.x @babel/plugin-syntax-jsx@7.x @babel/preset-react@7.x @babel/preset-react@7.x
After, create a.eslintrc.json
file. Then runnpx eslint .
to print errors. Usenpx eslint . --fix
to fix multiple errors.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Open app in browser:
npm start
Enjoy your greeting!
👤 STEVE W DAMES JR
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Hat tip to anyone whose code was used
This project is MIT licensed.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.