Skip to content

Commit

Permalink
Merge branch 'master' into releases/july
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuhanW authored Jul 4, 2024
2 parents 8bc2c1c + cf78544 commit 322a84b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions documentation/blog/2023-10-17-react-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,15 @@ After creating the provider, we will enclose components dependent on the data fr
To obtain the data from context API, we call useContext hook, which accepts a context as a parameter(in this case, **ThemeContext**).

```tsx
impor { useContext } from 'react';
import { useContext } from "react";
import { ThemeProvider, ThemeContext } from "../context";


const HeaderSection = () => {
<ThemeProvider>
<TopNav />
</ThemeProvider>;
};


const TopNav = () => {
const { theme, setTheme } = useContext(ThemeContext);

Expand All @@ -299,7 +297,6 @@ const TopNav = () => {
</div>
);
};

```

## Component enhancement with HOCs (higher-order components)
Expand Down

0 comments on commit 322a84b

Please sign in to comment.