
Product
Go Support Is Now Generally Available
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go 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's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
Security News
vlt adds real-time security selectors powered by Socket, enabling developers to query and analyze package risks directly in their dependency graph.
Security News
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.