Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
redux-first-routing
Advanced tools
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 462 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.