Sha256: e4dc86e6971270b3db2fb7803bfed4e0a32390510a575042ecd9a308b183351b
Contents?: true
Size: 384 Bytes
Versions: 23
Compression:
Stored size: 384 Bytes
Contents
import JasonContext from './JasonContext' import { useContext, useEffect } from 'react' export default function useSub(config, options = {}) { // useEffect uses strict equality const configJson = JSON.stringify(config) const subscribe = useContext(JasonContext).subscribe useEffect(() => { // @ts-ignore return subscribe(config, options).remove }, [configJson]) }
Version data entries
23 entries across 23 versions & 1 rubygems