MCPcopy Create free account
hub / github.com/DTStack/molecule / useContextViewEle

Function useContextViewEle

src/components/contextView/index.tsx:46–56  ·  view source on GitHub ↗
(props?: IContextViewProps)

Source from the content-addressed store, hash-verified

44 * It's a hook used in functional component
45 */
46export function useContextViewEle(props?: IContextViewProps) {
47 const [contextView, setContextView] = useState<IContextView>();
48
49 useEffect(() => {
50 // The useContextView can't be called at initial of useState
51 // Because this function has rendered an element
52 setContextView(useContextView(props));
53 }, []);
54
55 return contextView;
56}
57
58/**
59 * TODO: It's not a hook, don't begin with use

Callers 4

ActivityBarItemFunction · 0.90
ActivityBarFunction · 0.90
FolderTreeFunction · 0.90
index.tsxFile · 0.90

Calls 1

useContextViewFunction · 0.85

Tested by

no test coverage detected