Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-saga-final-form

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-saga-final-form - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

src/.index.ts.un~

2

package.json
{
"name": "redux-saga-final-form",
"version": "1.0.2",
"version": "1.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -18,14 +18,23 @@ redux-saga-final-form

## Usage
in your form component
```javascript
import { useListener } from 'redux-saga-final-form';
import { Form } from "react-final-form";
```javascript
export const SettingsComponent = () => {
const formListener = useListener(DOMAIN_SAVE_SETTINGS, DOMAIN_SAVE_SETTINGS_SUCCESS, DOMAIN_SAVE_SETTINGS_ERROR);
return <Form initialValues={initialValues} onSubmit={formListener} validate={validate}>
...
</Form>
}
export const MyComponent = () => {
const formListener = useListener(SUBMIT_START_ACTION, SUBMIT_SUCCESS_ACTION, SUBMIT_FAIL_ACTION);
return (
<Form
onSubmit={formListener}
render={(formRenderProps) => (
<form onSubmit={formRenderProps.handleSubmit}>
...
</form>
)}
/>
);
};
```

@@ -36,3 +45,4 @@

```javascript
import { finalFormSaga } from 'redux-saga-final-form';
import { finalFormSaga } from 'redux-saga-final-form';
import createSagaMiddleware from "redux-saga";

@@ -44,1 +54,10 @@ const sagaMiddleware = createSagaMiddleware();

SUBMIT_START_ACTION example:
```javascript
export const submitStatrAction = (payload: { formField1: string }) => ({
type: SUBMIT_START_ACTION
payload
});
```

@@ -29,3 +29,3 @@ import { useDispatch } from 'react-redux';

pendingCallbacks.delete(cbInfo.toClear)
cbInfo.callback();
cbInfo.callback(action.payload);
}

@@ -35,2 +35,2 @@

yield takeEvery((action: any) => !!pendingCallbacks.get(action.type), handleEvent);
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc