dialogReducer() — react Function Reference
Architecture documentation for the dialogReducer() function in OwnersStack.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 9344507c_132d_1fe7_454b_a7a398ced8e1["dialogReducer()"] 4e5b4a1f_694c_f426_36e2_a03da99b38d5["OwnersStack.js"] 9344507c_132d_1fe7_454b_a7a398ced8e1 -->|defined in| 4e5b4a1f_694c_f426_36e2_a03da99b38d5 style 9344507c_132d_1fe7_454b_a7a398ced8e1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/devtools/views/Components/OwnersStack.js lines 59–78
function dialogReducer(state: State, action: Action) {
switch (action.type) {
case 'UPDATE_OWNER_ID':
const selectedIndex = action.owners.findIndex(
owner => owner.id === action.ownerID,
);
return {
ownerID: action.ownerID,
owners: action.owners,
selectedIndex,
};
case 'UPDATE_SELECTED_INDEX':
return {
...state,
selectedIndex: action.selectedIndex,
};
default:
throw new Error(`Invalid action "${action.type}"`);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does dialogReducer() do?
dialogReducer() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/Components/OwnersStack.js.
Where is dialogReducer() defined?
dialogReducer() is defined in packages/react-devtools-shared/src/devtools/views/Components/OwnersStack.js at line 59.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free