Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@monokle/tree-navigator
Advanced tools
React library for rendering tree structures based on the Redux store.
Create tree structures based on your Redux state then easily render it in React.
// RTK Listeners setup
export const listenerMiddleware = createListenerMiddleware();
export type AppStartListening = TypedStartListening<RootState, AppDispatch>;
export type AppStopListening = TypedStopListening<RootState, AppDispatch>;
export const startAppListening = listenerMiddleware.startListening as AppStartListening;
export const stopAppListening = listenerMiddleware.stopListening as AppStopListening;
// configure the redux store
const store = configureStore({
reducer: combineReducers({
// add the reducer created by rtk-tree-navigator
...getTreeNavigatorReducer(),
// other reducers...
}),
middleware: getDefaultMiddleware => getDefaultMiddleware().prepend(
listenerMiddleware.middleware
),
});
// rtk-tree-navigator setup
setupTreeNavigators({
startListening: startAppListening,
stopListening: stopAppListening,
dispatch: store.dispatch
})
// create your first tree navigator
export const treeNavigator = createTreeNavigator("Resources");
// register a section
treeNavigator.registerSection("sectionId" {
scope: (state) => state.main.resources,
build: {
label: "Some section
},
items: {
build: scope => scope.resources.map((resource) => {
return {
id: resource.id,
label: resource.name,
props: {
isSelected: resource.isSelected
}
}
}),
}
});
// register a subsection
treeNavigator.registerSection("sectionId.subsectionId", {/*...*/});
// unregister a section
treeNavigator.unregisterSection('id');
// the tree navigator can be rendered by using the Renderer component
<treeNavigator.Renderer />
Possible refactors:
SectionBlueprint
could be renamed to TreeLevel
and refactored into a classItemBlueprint
could be renamed to TreeNode
SectionInstance
could be TreeLevelInstance
and ItemInstance
could be TreeNodeInstance
FAQs
React library for rendering tree structures based on the Redux store.
We found that @monokle/tree-navigator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.