This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
yarn test:watch
Open https://localhost:3000 with your browser to see the result.
yarn add next-pwa (to install)
yarn build
yarn start
I'm going to use Leaflet in this work, which is an open-souece library, different from GoogleMaps. React-Leaflet is a wrapper for Leaflet, which is a JavaScript library for interactive maps.
-
Free CMS for React.js, works is good.
-
getStaticPaths => is used to generate the urls in build time /about, /trip/lisbon
-
getStaticProps => is used to fetch data from the page (props) - build time - static
-
getServerSideProps => serves to fetch data from the page (props) - runtime - every request (bundle stays on the server)
-
getInitialProps => it is used to fetch data from the page (props) - runtime - every request (bundle also comes to the client) - hydrate (it is almost in disuse)