Starwars Blog Reading List A React JS WebApp Guide

Setup Your Starwars Blog App

  1. Environment Setup:
  2. Ensure you are using Node version 10.
  3. Install packages by running: $ npm install
  4. Create your environment file with: $ cp .env.example .env

  5. Development Server:

  6. To enable live reloading on Webpack Dev Server (compatible with Windows, Mac, Linux, or Gitpod): $ npm run start

  7. Styling:

  8. Update styles/index.scss or add new .scss files within styles/ folder.
  9. Import new styles as needed into your SCSS or JS files.

  10. Components:

  11. Add more files to ./src/js/components or styles folder as necessary.
  12. All components are now functional components with hooks: useState() replaces class constructor and state.

Note: Components have transitioned to functional forms to leverage React hooks, enhancing code simplicity and maintainability.


Key Takeaways:

  • Utilize Node version 10 for compatibility.
  • Functional components with React hooks streamline state management.
  • Leverage SCSS for flexible styling.

Happy coding and may the Force be with your project!

zip 文件大小:439.05KB