useNetwork
Retrieve the currently active network in your React app using the Blux SDK.
The useNetwork hook returns the currently active network of the app.
Import
import { useNetwork } from "@bluxcc/react";Usage
import { useNetwork } from "@bluxcc/react";
const Comp = () => {
const network = useNetwork();
return <div>{network}</div>;
};Return Type
string
The active network string (e.g. 'Public Global Stellar Network ; September 2015'). Import networks from @bluxcc/react to compare against known network values.