
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
redux-coreapi
Advanced tools
redux-coreapiredux-coreapi is a minimal interface between Redux and Core API JavaScript
clients. More specifically, redux-coreapi dispatches Redux actions for Core
API action and document request-response cycles, allowing Core API clients to
be integrated simply into Redux applications.
redux-coreapi does not have any prerequisites or direct dependencies, but it
is assumed that it will be used alongside
redux and
coreapi.
Install with npm
$ npm i redux-coreapi
or yarn
$ yarn add redux-coreapi
Begin by applying the redux-coreapi middleware to the store. For example:
import { createStore, applyMiddleware } from 'redux'
import { coreapiMiddleware } from 'redux-coreapi'
import reducer from './reducer'
const store = createStore(
reducer,
applyMiddleware(coreapiMiddleware)
)
Use the get and action action creators to make Core API document and action
requests, respectively.
import coreapi from 'coreapi'
import { action, get } from 'redux-coreapi'
import document from './path/to/existing/document'
const client = new coreapi.Client()
// Load a Core API schema document
store.dispatch(get(client, 'https://example.com/api/v1/schema'))
// Send a request to create a new object
store.dispatch(action(
client,
document,
['objects', 'create'],
{
name: 'Example',
description: 'redux-coreapi example object',
}
))
Full API documentation is available in docs/api.md file
or at https://bitsick.github.io/redux-coreapi/api.md.
get(client, url)Make a Core API document request.
client (coreapi.Client) The Core API client instance with which the
request will be made.url (string) The URL of the document to request.(Object) A Redux action for the Core API get request.
action(client, document, keys, [params])Make a Core API action request.
client (coreapi.Client) The Core API client instance with which the
request will be made.document (coreapi.Document) The Core API document describing the API
to which the request will be sent.keys (string[]) An array of strings describing the action to request. For
example, ["users", "list"] or ["widgets", 0, "update"].[params] (Object) Optional data to include with the request. The
structure of the object depends on the action being requested.(Object) A Redux action for the Core API action request.
See the example directory for a complete working example.
See CONTRIBUTING.md for details on making contributions.
This repository uses
GitFlow and
semantic versioning. See the tags in the
master branch for the available versions.
Apache License 2.0
FAQs
A minimal interface between Redux and Core API JavaScript clients.
The npm package redux-coreapi receives a total of 5 weekly downloads. As such, redux-coreapi popularity was classified as not popular.
We found that redux-coreapi 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.