This commit is contained in:
2025-11-07 00:46:35 +01:00
parent 2118f002d1
commit c3f837b90f
143 changed files with 4223 additions and 9686 deletions

View File

@@ -0,0 +1,30 @@
/*
# EXAMPLE USAGE OF CONTEXT IN A COMPONENT:
## Wrap your app tree with the provider (e.g., in App.tsx)
```tsx
import { UserContextProvider } from "../context/UserContext";
function App() {
return (
<UserContextProvider>
<YourRoutes />
</UserContextProvider>
);
}
```
## Consume in any child component
```tsx
import React, { useContext } from "react"
import { UserContext } from '../context/UserContext';
export default function ExampleComponent() {
const { user, setUser } = useContext(UserContext);
return ...;
}
```