Skip to content

Instantly share code, notes, and snippets.

View test-use-global-hook.md

LoginForm.js

import React, { useState } from "react";

import useGlobal from "../../store";

function LoginForm() {
  const [loginUser, setUser] = useState();
  const [globalState, globalActions] = useGlobal();