Open LXVC opened 8 months ago
function usePublicClient() { const [client, setClient] = useState<Client | null>(null); const chain = useChain(); useEffect(() => { setClient( createClient({ chain: chain, transport: http(), }).extend(publicActionReverseMirage), ); }, [chain]); }
Code as shown above, How should I correctly set the type of useState to ensure that the returned client has all the methods from publicActionReverseMirage?
useState
client
publicActionReverseMirage
@kyscott18
Code as shown above, How should I correctly set the type of
useState
to ensure that the returnedclient
has all the methods frompublicActionReverseMirage
?