![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
redux-first-routing
Advanced tools
Readme
Achieve client-side routing the Redux way:
This library wraps history
and provides a framework-agnostic base for accomplishing Redux-first routing. For a complete routing solution, pair it with a compatible client-side routing library (see Recipies for examples).
There are dozens of ways to design the state shape of the location data, and this project by nature must choose a single, opinonated implementation. Here is the current design:
{
..., // other redux state
location: {
pathname: '/nested/path/',
search: '?with=query',
queries: {
with: 'query',
},
hash: '#and-hash'
}
}
// current location: 'www.website.com/nested/path?with=query#and-hash'
Here's a look at the exports in src/index.js
:
// History API
export { createBrowserHistory } from 'history/createBrowserHistory';
export { startListener } from './listener';
// Redux API
export { PUSH, REPLACE, GO, GO_BACK, GO_FORWARD, LOCATION_CHANGE } from './constants';
export { push, replace, go, goBack, goForward, locationChange } from './actions';
export { routerMiddleware } from './middleware';
export { routerReducer } from './reducer';
push()
, replace()
, go()
, goBack()
, goForward()
history
navigation methods directly!PUSH
, REPLACE
, GO
, GO_BACK
, GO_FORWARD
routerMiddleware(history)
routerReducer
pathname
, search
, hash
) to the state tree upon receiving a LOCATION_CHANGE
action.createBrowserHistory()
history
object.startListener(history, store)
history
listener that responds to the middleware and external navigation by dispatching a locationChange
action.Contributions are welcome and are greatly appreciated! :tada:
Feel free to file an issue, start a discussion, or send a pull request.
MIT
FAQs
Redux-first routing
The npm package redux-first-routing receives a total of 214 weekly downloads. As such, redux-first-routing popularity was classified as not popular.
We found that redux-first-routing 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 four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.