TrySilenceFatalError Class — react Architecture
Architecture documentation for the TrySilenceFatalError class in index.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD c71413b7_f764_4806_f854_5d07d2bcd4db["TrySilenceFatalError"] 81bda781_d1ab_04a2_f9a5_679111cfc7c2["index.js"] c71413b7_f764_4806_f854_5d07d2bcd4db -->|defined in| 81bda781_d1ab_04a2_f9a5_679111cfc7c2 d86185df_ff1b_3a67_32ef_7a70dc7d2b2a["render()"] c71413b7_f764_4806_f854_5d07d2bcd4db -->|method| d86185df_ff1b_3a67_32ef_7a70dc7d2b2a
Relationship Graph
Source Code
fixtures/dom/src/components/fixtures/error-handling/index.js lines 217–242
class TrySilenceFatalError extends React.Component {
container = document.createElement('div');
triggerErrorAndCatch = () => {
try {
ReactDOM.flushSync(() => {
ReactDOM.render(
<BadRender
doThrow={() => {
throw new Error('Caught error');
}}
/>,
this.container
);
});
} catch (e) {}
};
render() {
return (
<SilenceErrors>
<button onClick={this.triggerErrorAndCatch}>Throw fatal error</button>
</SilenceErrors>
);
}
}
Domain
Source
Frequently Asked Questions
What is the TrySilenceFatalError class?
TrySilenceFatalError is a class in the react codebase, defined in fixtures/dom/src/components/fixtures/error-handling/index.js.
Where is TrySilenceFatalError defined?
TrySilenceFatalError is defined in fixtures/dom/src/components/fixtures/error-handling/index.js at line 217.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free