in src/devtools/views/ModalDialog.js [75:97]
function ModalDialogContextController({ children }: Props) {
const [state, dispatch] = useReducer<State, Action>(dialogReducer, {
content: null,
isVisible: false,
title: null,
});
const value = useMemo<ModalDialogContextType>(
() => ({
content: state.content,
isVisible: state.isVisible,
title: state.title,
dispatch,
}),
[state, dispatch]
);
return (
<ModalDialogContext.Provider value={value}>
{children}
</ModalDialogContext.Provider>
);
}