Загрузка...

React Context with Typescript to show current active page tab, Global Context provider with reducer

This is part4 of NextJs Sanity Stripe eCommerce Project. In this video we solved the problem when refreshing the whole page and losing the focus or the indicator on the tab of the page to show which page is active currently.
We used Typescript, React Global Context Provider, createContext, useContext, useReducer to allow all pages to access and control the state that manages the pages tabs.
NextJs 13
ReactJs
Global Context Provider
createContext
useContext
useReducer
Sanity
MUI5
Stripe
Current active page indicator

Source Code on github:
https://github.com/codelikepro22/e-shop-ecommerce/tree/part4

00:00 Introduction
00:53 React Global Context in Typescript
08:15 Changing active tab state from the current page

Видео React Context with Typescript to show current active page tab, Global Context provider with reducer канала Code Like Pro
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять