
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Setup
import AltRouter from 'alt-router'
import React from 'react'
import createBrowserHistory from 'history/lib/createBrowserHistory'
// your alt instance
import alt from '../alt'
const routes = (
<Route path="/" component={App}>
<Route path="about" component={About} />
<Route path="inbox" component={Inbox} />
</Route>
)
React.render((
<AltRouter flux={alt} history={createBrowserHistory()} routes={routes} />
), document.getElementById('root'))
Changing routes
import alt from '../alt'
const changeRoute = () => {
alt.router.pushState(null, '/home')
}
Bootstrap routes
For when you want to reload a user's entire application state including which route they were in
const bootstrapState = {
state: null,
pathname: '/notifications',
}
alt.bootstrap({ AltHistoryStore: bootstrapState })
FAQs
Connect react-router to alt
The npm package alt-router receives a total of 2 weekly downloads. As such, alt-router popularity was classified as not popular.
We found that alt-router demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.