16 lines
674 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react'
import "styles/globals.css";
import { CounterProvider } from "context/counterContext";
function MyApp({ Component, pageProps }) {
return (
// Здесь компонент Component оборачиваем провайдеры глобального контекста. Если контекст используется не во всём приложении, а в каком-то определённом компоненте и его дочерних элементах, стоит занести провайдер туда
<CounterProvider>
<Component {...pageProps} />
</CounterProvider>
);
}
export default MyApp;