npm install
gatsby develop
or
npm start
gatsby build
gatsby serve
npm t
-
Gatsby - it's a free and open source framework based on React that helps developers build blazing fast websites and apps. I use it because it comes with the well-configured development environment
-
Axios - it's a free library to make AJAX requests
-
Jest - it's a good library to do some tests
-
Helmet - it's a library to change the content of the HEAD tag, like title and favicon
The main file is located in src/pages/index.js. In this file we import all the components that the application uses. Here I use a main component that control the state of the application, and pass properties to child components
The components are located in src/components/. Note that each component has its own style imports and other components as well.
The test components are located in _tests_. Here I did some basic tests, like checking if the props are receiving an array
All the styles are located in src/styles/
All pages are located in src/pages/. Here we have only two pages, index and 404. if you need more pages, add to this folder
If you need more information about components, props, state, import and export, see the React.js docs