This project was bootstrapped with Create React App.
After installing dependencies (npm install
) in the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Launches the test runner in the interactive watch mode.
Next.js might be a better choice for a real project, as it gives several features for free: SSR, SSG, directory-based routing, code-splitting, etc. CRA is IMO better suited for proving my good understanding of React concepts, such as hand-made routing.
I chose React's Context API, but it could also be replaced with a state-management library, like Redux.
I went for CSS Modules + SASS/SCSS preprocessor. CSS-in-JS would be also an alternative, with styled-components or Emotion.
With help of Intersection Observer API.