import { useContext } from "react";
      
      const value = useContext(Context); 
      Javascript language logo
      your recipe card header background

      React useContext hook

      context
      useContext
      hook
      ...
      React JavaScript Recipes

      Accepts a context object (the value returned fromReact.createContext) and returns the current context value for that context. The current context value is determined by the value prop of the nearest above the calling component in the tree.

      Library: react

      Shortcut: react.hook.context.use

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.