
Product
Introducing Historical Analytics – Now in Beta
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
mobx-little-router-react
Advanced tools
import React from 'react'
import ReactDOM from 'react-dom'
import { createBrowserHistory } from 'history'
import { install, RouterProvider, Outlet } from 'mobx-little-router-react'
import { install } from 'mobx-little-router-react'
// Note that <Outlet/> is rendered at the App component level.
// This will allow any matched child route to also be rendered.
// If you need to block child rendering you can do that by not rendering
// the <Outlet/> element.
const App = () => (
<div>
<header>Acme Inc.</header>
<Outlet/>
</div>
)
const Home = () => (
<div>
<h1>Home</h1>
</div>
)
const About = () => (
<div>
<h1>About</h1>
</div>
)
install({
history: createBrowserHistory(),
routes: [
{ path: '', component: Home },
{ path: 'about', component: About }
]
})
router.start(() => {
ReactDOM.render(
<RouterProvider router={router}>
<App />
</RouterProvider>,
document.getElementById('root')
)
})
Provides the router context
Used to navigate
Used to render routes at each depth.
injects router context into component props.
component
ReactComponent
A react component to render when the route is matched
outlet
string
An optional named outlet to render this route into, ie. 'modal'
animate
boolean, default: false
Do you wish to use built in animation features for this route. Specify a data-transition-ref
attribute on the node you are animating otherwise the Component root node will be used for detecting the transitionend
event.
FAQs
React adapter components for mobx-router.
The npm package mobx-little-router-react receives a total of 74 weekly downloads. As such, mobx-little-router-react popularity was classified as not popular.
We found that mobx-little-router-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.