Giter Club home page Giter Club logo

podcast-nextjs's Introduction

Use yarn next dev or yarn dev commands to run the app locally. Use yarn build && yarn start comman to run in production mode.

getInitialProps()

We can use getInitialProps() only inside pages, it's part of NextJS The fetch method doesn't exist in NextJS, we need to add library isomorphic-fetch

yarn add isomorphic-fetch

Link component

It has to be imported from 'next/link' To use it, we need to include href as an attribute, and include an tag to make it work. When you click on the link, NextJS will call the part of js needed to render that new page. Not all the dependencies again.

Prefetch

The method prefetch doesn't preload getInitialProps, only the payload (HTML, CSS, JS) The method only workd in PRODUCTION, not in development

Promise.all()

To make several request at the same time.

Head component

Here we can add all the things related to the of a regular HTML You can include things like title and metadata.

Error component

Next help us to handle the server error, only passing the statusCode as an attribute The res prop tell us the status that server replied You can also create custom error with a file _error.js inside pages

podcast-nextjs's People

Contributors

do-diegoortiz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.