0

I'm building a react-redux, redux-form application. I'm going to have one page where I want to render a SELECT box which pulls a list of options dynamically from the server. My question is how to architect this simple form in a react-redux app.

Should this SELECT form element be powered by react-redux-form? Should I use redux/reducers to query and store the state which will power the dropdown options? Or is that overkill?

1 Answer 1

1

If your select box is a part of a large form, that is submitted, maybe even validated, and sent to the server, use redux-form.

If your select box is just a means for selecting a single value for the purposes of for example filtering a list, redux-form is overkill and you will be better off without. Use component state to keep tabs on which option is selected, but store the options fetched from the server inside the redux store.

Sign up to request clarification or add additional context in comments.

2 Comments

The select box will have it's options obtained from the server and then sent to the server. So redux-form sounds like the way to go...
Do you know of an examples/tutorials that show how to populate a redux-form select box with values from an AJAX call and then submit back to the server? Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.