
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@launchpadlab/lp-redux-api
Advanced tools
Action creators and reducers for making API requests with redux.
// Define an API action
import { createRequest } from '@launchpadlab/lp-redux-api'
const fetchUser = createRequest('FETCH_USER', (id) => ({
url: '/users/' + id,
}))
// Dispatch the action from a component (mapDispatchToProps not shown)
function Component({ fetchUser }) {
return <button onClick={() => fetchUser(5)}> Fetch user with id: 5 </button>
}
// Store the response in a reducer
import { handleActions } from 'redux-actions'
import { setOnSuccess } from '@launchpadlab/lp-redux-api'
const reducer = handleActions(
{
[fetchUser]: setOnSuccess('user'),
},
{}
)
// state.user will contain the response when the request completes.
The key functions in this library are:
createRequest(key, requestInfo) - this function allows you to define a redux action that makes an API request asynchronously. By default, API requests are made using lp-requests, although this is configurable.
setOnSuccess(path) | setOnFailure(path) - these functions allow you to easily store the responses of API actions in your redux store.
Additional usage information, as well as a list of other helpers this library provides, can be found in the documentation.
Documentation and usage info can be found in docs.md.
This package follows the Opex NPM package guidelines. Please refer to the linked document for information on contributing, testing and versioning.
FAQs
redux middleware and api library
The npm package @launchpadlab/lp-redux-api receives a total of 166 weekly downloads. As such, @launchpadlab/lp-redux-api popularity was classified as not popular.
We found that @launchpadlab/lp-redux-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.