useActiveNamespace

Hook that provides the currently active namespace and a callback for setting the active namespace.

Example
const Component: React.FC = (props) => {
   const [activeNamespace, setActiveNamespace] = useActiveNamespace();
   return <select
     value={activeNamespace}
     onChange={(e) => setActiveNamespace(e.target.value)}
   >
     {
       // ...namespace options
     }
   </select>
}

Returns A tuple containing the current active namespace and setter callback.