You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

redux-form-connect-standalone

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-form-connect-standalone

A High Order Component to allow you to use redux-form without the need of a single root Provider

0.0.2
latest
npmnpm
Version published
Weekly downloads
8
300%
Maintainers
1
Weekly downloads
 
Created
Source

Redux Connect Standalone

This is High Order Component allows you to use reduxForm when you aren't able to have a single root Provider in your application. Eg: You are migrating a legacy application to React and has a few react components inside this application.

Before using this, you need to configure your redux store and export it, just like below.

import { createStore } from 'redux';
import rootReducer 'path/to/rootReducer';

const store = createStore(rootReducer)
export default store;

Then, you can create a file named connect, import the store into it and generate you connect function:

import createReduxForm from 'redux-form-connect-standalone';
import store from 'path/to/youStore'

export const reduxForm = createReduxForm(store);

Now, you can use this function the same way you would use reduxForm function:

import { reduxForm } from 'path/to/yourReduxForm';
import TodoForm from './TodoForm';

export default reduxForm({ ...reduxFormConfig })(TodoForm)

License

MIT

Keywords

redux

FAQs

Package last updated on 10 Oct 2017

Did you know?

Socket

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.

Install

Related posts