![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@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 />
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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.