try-catch-logical-expression.js — react Source File
Architecture documentation for try-catch-logical-expression.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
function Component(props) {
let result;
try {
// items.length is accessed WITHIN the && expression
result = props.cond && props.foo && props.items.length;
} catch (e) {
result = 'error';
}
return result;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{cond: true, foo: true, items: [1, 2, 3]}],
sequentialRenders: [
{cond: true, foo: true, items: [1, 2, 3]},
{cond: true, foo: true, items: [1, 2, 3]},
{cond: true, foo: true, items: [1, 2, 3, 4]},
{cond: false, foo: true, items: [1, 2, 3]},
{cond: true, foo: false, items: [1, 2, 3]},
{cond: true, foo: true, items: null}, // errors because props.items.length throws
{cond: null, foo: true, items: [1]},
],
};
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does try-catch-logical-expression.js do?
try-catch-logical-expression.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in try-catch-logical-expression.js?
try-catch-logical-expression.js defines 1 function(s): Component.
Where is try-catch-logical-expression.js in the architecture?
try-catch-logical-expression.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/try-catch-logical-expression.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free