Skip to content

Commit

Permalink
content(react): fix react context
Browse files Browse the repository at this point in the history
  • Loading branch information
matschik committed Jul 28, 2024
1 parent e5aa6e5 commit bca2af8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions content/4-component-composition/5-context/react/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useState, createContext } from "react";
import { useState } from "react";
import UserProfile from "./UserProfile";

export const UserContext = createContext();
import { UserContext } from "./UserContext";

export default function App() {
// In a real app, you would fetch the user data from an API
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createContext } from "react";

export const UserContext = createContext();

0 comments on commit bca2af8

Please sign in to comment.