Manage global state with React hooks.