Episode 09 • Making Websites With Next.js And Strapi

Using Context API

In this episode we are going to use React Context API to get the data for our navigation and also to create a simple state management.

Currently we are passing the data to the navigation component with prop drilling. Nothing wrong with that, but sometimes that can get pretty complex so you have to use other strategies to get the data from one component to another. That is why we are going to use Context API in this episode, and get rid of prop drilling to get the data to our navigation component. Also I'm going to show you how to create simple state management using Context API.

Download code

Wanna ask a question about this video?

Like This Video?

Consider supporting me on Patreon.

...or you can share this video, that also helps ;)

  • Episode 01 • Duration 18:49

    Setup And First Steps

  • Episode 02 • Duration 24:03

    CSS in JS

  • Episode 03 • Duration 15:25

    Fetching The Data

  • Episode 04 • Duration 18:33

    Layouts With Reflexbox

  • Episode 05 • Duration 19:34

    Static Routes, Nested Routes, And Navigation

  • Episode 06 • Duration 19:50

    Dynamic routes

  • Episode 07 • Duration 21:19

    Pagination

  • Episode 08 • Duration 08:59

    Next SEO

  • Episode 09 • Duration 12:28

    Using Context API

  • Episode 10 • Duration 27:34

    Deploy To Digital Ocean

  • Episode 11 • Duration 09:53

    getStaticProps

  • Episode 12 • Duration 07:10

    Incremental Static Regeneration

  • Episode 13 • Duration 34:08

    Multi language

  • Episode 14 • Duration 27:08

    User Authentication

  • Episode 15 • Duration 13:57

    Add Data To Strapi From Next.js

  • Episode 01 • Duration 18:49

    Setup And First Steps

  • Episode 02 • Duration 24:03

    CSS in JS

  • Episode 03 • Duration 15:25

    Fetching The Data

  • Episode 04 • Duration 18:33

    Layouts With Reflexbox

  • Episode 05 • Duration 19:34

    Static Routes, Nested Routes, And Navigation

  • Episode 06 • Duration 19:50

    Dynamic routes

  • Episode 07 • Duration 21:19

    Pagination

  • Episode 08 • Duration 08:59

    Next SEO

  • Episode 09 • Duration 12:28

    Using Context API

  • Episode 10 • Duration 27:34

    Deploy To Digital Ocean

  • Episode 11 • Duration 09:53

    getStaticProps

  • Episode 12 • Duration 07:10

    Incremental Static Regeneration

  • Episode 13 • Duration 34:08

    Multi language

  • Episode 14 • Duration 27:08

    User Authentication

  • Episode 15 • Duration 13:57

    Add Data To Strapi From Next.js