davidkpiano / react-redux-form

Create forms easily in React with Redux.
https://davidkpiano.github.io/react-redux-form
MIT License
2.07k stars 251 forks source link

allow nested thunk actions in LocalForm #1215

Open eliseev-eag opened 4 years ago

eliseev-eag commented 4 years ago

The Problem

Hi everyone! I work in large project that uses react-redux-form. Often I want to use my custom thunk actions that use react-redux-form thunk actions (for example push or merge) under the hood with LocalForm. But dispatch in Local Form doesn't allow using nested thunk action

Steps to Reproduce

I prepared CodeSandbox example https://codesandbox.io/s/rrf-nested-thunk-actions-yig9n?fontsize=14&hidenavigation=1&theme=dark

I understand that this is an artificial example and if I used non-nested thunk actions, this would work. But often in real life I need nested actions

Click to Button in CodeSandbox example

Expected Behavior

In CodeSandbox example, after clicking on Button, form counter was increased

Actual Behavior

In CodeSandbox example, after clicking on Button, form counter wasn't increased

Reproducible Code Example

https://codesandbox.io/s/rrf-nested-thunk-actions-yig9n?fontsize=14&hidenavigation=1&theme=dark