Questions tagged [redux-form]
Redux Form works with React and Redux to enable a form in React to use Redux to store all of its state.
2,404
questions
0
votes
0
answers
59
views
Implementing offline data storage and synchronization in React Native using react-native-offline and redux-persist
I am currently working on a React Native app where I need to implement offline data storage and synchronization. After researching, I found that the react-native-offline and redux-persist plugins can ...
0
votes
0
answers
14
views
Getting redux-form error when I import Modal from native-base instead of react-native
I have the following code in my React Native app:
class ModalComponent extends Component {
render() {
return (
<Modal visible={this.props.visible}>
<...
0
votes
0
answers
12
views
Upgrading ReduxForms to react final form
`Has anyone upgraded from an older version of redux form to react-final form? We are trying to update our older app and can’t figure out the right way to update the components using reduxForms. Here ...
0
votes
0
answers
36
views
How to create a field (such as a featured flag) that can only be applied to one item in the field array?
We are currently working on migrating our profile editor form from Redux Form to React Final Form. In this, we have a field array representing a list of object values - in this case, a list of ...
0
votes
0
answers
27
views
How can I display initial values of redux-form Field arrays?
I have a redux-form with multiple sections. The first section contains simple Input Fields, but the rest of the sections are all Field Arrays. I have tried to include editing functionality where the ...
0
votes
1
answer
239
views
how can i use react redux in class component?
im a new to redux, and i want to know if it possible to use redux in class component.
we know that hooks works only in function component, so i export a function to use useSelector to access the store ...
0
votes
0
answers
41
views
Redux Form toggle password visibility clears input value
I'm having an issue when using redux form with react native, when I toggle the password visibility the password field input is cleared, when I remove redux form things work as expected. Below is the ...
0
votes
1
answer
29
views
Redux-form fires an extra CHANGE action when deleting an element in complex fieldArray
I have a form built with reduxForm which has a nested fieldArray component.
In this component, I have two dropdowns. The first determines what will be in the second dropdown.
Here's my solution for ...
0
votes
0
answers
74
views
React-testing-library testing redux-form, react-select component. test is not failing
I am testing react-select component used with redux-form field, created mocked ReduxForm , my SubsidiaryPicker is render in side TestReduxForm, after updating subsidiary in subsidiary picker,
selected ...
1
vote
0
answers
32
views
Redux Reducer Handling complex JSON
I am building a Redux form in React app which looks like below -
It has multiple leaders and 3 editable fields -
Use Case: User can update any field on any leader and there is a single "Save&...
0
votes
0
answers
27
views
Redux-form-material-ui library is not working in latest updated react app
I am working on updating the outdated react app into latest one, From React v15.x to latest version of react and also updating material-ui components.
I found redux-form-material-ui lib has been used ...
1
vote
0
answers
30
views
How to add a file uploaded via react-dropzone to a field managed by redux-form
I have a form created with redux-form.
I added a dropzone created with react-dropzone.
I have two endpoints:
[POST] /image: to upload an image (using react-dropzone). This returns a payload that ...
1
vote
1
answer
75
views
How to use styled components with Field from redux form and custom component?
I have something like this:
const StyledField = styled(Field)`
outline: 0;
width: 100%;
padding: 10px;
border: 1px solid #dbdbdb;
background-color: #fff;
line-height: 1.2;
border-radius: ...
0
votes
1
answer
107
views
How to submit a form with a modal?
I have a form made in react, using reduxForm that when submitting, opens a modal for validation,
I put this modal in a component and if the user confirm the button in modal, the main form needs to be ...
0
votes
1
answer
190
views
Enable Disable submit button in Parent Component based on Child State using React - Redux Form
I have two components in React - Parent and Child. The Submit button is in the parent component.
My question is how do I enable, disable the submit button in parent component based on redux async ...
1
vote
0
answers
32
views
I am completely new to Redux, I am trying to make a post request with axios but I am getting 422 Unprocessable content error or GET_ERRORS in redux
Here is the code, I have the object as it is in the backend but I don't understand what's unprocessable content. I want to know If I am doing the redux part right and I can't see the POST_DEPARTMENT ...
1
vote
0
answers
23
views
Redux-form: how can I mutate field by onSubmit
I have to clear the Account field if I change the Partner field. How can I do this with the onSubmit event using Redux-form?
Example code:
<form onSubmit={handleSubmit}>
<...
0
votes
1
answer
185
views
Can't send files using Redux Form
I'm creating a webpage for me and I'm working with Redux/Redux Form. My backend is working fine, but I can't figure out how to work on my front-end. I'm not using any library to fetch the image in my ...
0
votes
1
answer
28
views
reset the textbox on specific value of dropdown (in HandleChange()) in Redux form
How to reset a textbox when another dropdown field is changed in redux-form?
I tried using dispatch(change()) syntax but I keep getting the following error:
redux-form/lib/change could not be ...
1
vote
0
answers
121
views
Alternative to redux-form dispatch change action in react-final-form
I'm asked to migrate from redux-form to react-final-form.
I want to know if there is a way to replace all dispatch change actions of redux-form with a reasonable solution.
Found a solution (work ...
1
vote
0
answers
71
views
I am getting Uncaught Error: Maximum update depth exceeded when I tried to pass one custom intermediate function for validate prop of redux form field
My component where I am passing validate prop ->>>>
<div className="label-input-container activity-reason-dropdown">
<Dropdown
...
1
vote
2
answers
1k
views
react redux axios post signup request
I'm learning redux, I'm trying to create a registration form. When I send my form nothing happens. Can you tell me if the development of the action and the reducer and service are well done?I have the ...
-1
votes
2
answers
2k
views
why can't I export 'combineReducers' (imported as 'combineReducers') was not found in 'react-redux'
Here is my main js code and why combine all reducer
cartredux\src\redux\reducers\main.js
import {combineReducers} from "react-redux";
import { cartreducer } from "./reducer";
...
0
votes
2
answers
241
views
Is there another react form library that maintains full form state on form component unmount/remount?
I'm wanting to migrate our front-end infrastructure off redux-form which seems to be largely abandoned now. We have projects with multiple forms that utilise the destroyOnUnmount={false} option set ...
2
votes
0
answers
124
views
cursor moves one space to the left redux form react native
So I am having a problem with redux form and the cursor moving one position to the left when typing from the middle of the word. What can I do to resolve this issue?
0
votes
1
answer
259
views
With redux form how can I normalize and allow only positive integers on an input type number?
I am on 8.3.7 version of redux-form, I am using the Field which should be allowed to accept ONLY positive integers between the range 0-9999.
const REGEX_SPECIAL_CHARACTERS = /[@\-\_\!\#\$\%\.\&]/;
...
1
vote
0
answers
96
views
using redux for state management , action is being triggered but reducer is not dispatching action
i am using redux for state management, redux-form to select a option from list of option initialised in state , every thing is working fine, when i am selecting option my action creator is receiving ...
0
votes
1
answer
278
views
Having trouble with react error: 'Objects are not valid as a React child. If you meant to render a collection of children, use an array instead'
I am creating a React app with a Django backend and using Redux to maintain state. I am trying to render data in a child component and I keep getting this error: Objects are not valid as a React child ...
0
votes
0
answers
350
views
React testing library to work with redux-form issue
Having an issue trying to test redux-forms components. I keep getting an error FormSection must be inside a component decorated with reduxForm() I tried a couple of different ways to implement this ...
1
vote
0
answers
135
views
React testing library with redux-form issue
Having an issue trying to test redux-forms components. I keep getting an error FormSection must be inside a component decorated with reduxForm() Here is test code.
import { createStore, ...
2
votes
3
answers
436
views
redux-form How to have initial value in the input field
I use redux-form for my form, following the example: https://redux-form.com/8.3.0/docs/api/fields.md/
So the <Fields /> is like so:
<Fields
names={['firstName', 'lastName']}
component={...
0
votes
1
answer
758
views
Removing a specific Field in a map of a state always remove the last element of it
I have in my functionnal component define a state with useState like that :
const [appointmentList, setAppointmentList] = useState([]);
This state reprensent a list of form, i can add as many as i ...
0
votes
1
answer
565
views
Redux: How to create a new Redux store for separate child react components
I have a react component I'm importing into my project. Both my main project and the component use separate redux stores. Initially the component was just imported once and this had no issue, but when ...
2
votes
1
answer
817
views
How can i pass the data from the response as a prop to a component?
I'm trying to get the response from the API to the store in order to make it available for any component to use it. in this case, I would like to be able to use all the body from the response as a ...
1
vote
0
answers
174
views
How to implement isDirty() in redux-form?
The components inserted here "UserBasicData" and "UserSendData" have "Field" input fields in it. After inserting the compoenets,this complete component is exported as ...
1
vote
0
answers
185
views
Unit testing react child components that are connected from a redux-form to increase test coverage
I have a simple React component that used FieldArray from 'redux-form' library and I am having a hard time increasing the test coverage for the component. When I console log the component, I get a ...
0
votes
0
answers
29
views
How to display the correct date after adding a number of days to it?
I want to display the correct calculated date on a text field in a redux form after getting the number of days to be added from another field in the redux form. Is there any other way to do it? The ...
2
votes
3
answers
523
views
How to initialize standalone Radio Button Group component checked property state with redux \ redux-form
I'm learning react and I am stuck. I am trying to share a form between Edit and Create components. I am having a really hard time figuring out what I am doing wrong to initialize the values of the ...
0
votes
1
answer
68
views
What is @reduxForm
I have a React project and I don't understand this code
import { reduxForm } from 'redux-form';
@reduxForm({
form: EDIT_FORM,
initialValues: {
...
0
votes
0
answers
46
views
'__WEBPACK_IMPORTED_MODULE_1__.default is not a constructor' this error is happening when i use redux-form
when i try to use redux-form library and imported it this error is poping:
App.js:19 Uncaught TypeError: _streams_StreamCreate__WEBPACK_IMPORTED_MODULE_1__.default is not a constructor
here is the ...
1
vote
0
answers
68
views
Redux-Form clears existing form properties from state after change of route
I have React application in which I am using Redux to manage application state. There are mutltiple reducers which is custom created and I have forms too in my application. To maintain form state I ...
1
vote
0
answers
163
views
How to export a Functional component as a redux form?
I am writing this code under a .tsx file. I need to convert this compoenent into a redux form and export it to its parent component. I am getting error for the following code as :-
Line 80:3: ...
1
vote
0
answers
28
views
Reset is not clearing fields [redux-form]
I have form with select dropdown, checkboxes and text fields. When I read redux documentation for reseting fields it gives more than 1 way to clear fields - https://redux-form.com/6.0.0-alpha.4/docs/...
0
votes
1
answer
202
views
Redux form with submit to create, edit and delete records (multiple submit)
I am experimenting with react. I am mostly backend so frontend gives me some obvious troubles. I tried some google solutions but not getting any success. Here is the problem. I have following form.
...
1
vote
0
answers
137
views
i'm facing issue when i run my application in xcode "Command Ld failed with a nonzero exit code"
Command Ld failed with a nonzero exit code
0
votes
1
answer
1k
views
React-final-form focus doesn't focus on given field
I was trying to focus on the field when the user press the button, I used focus('fieldName'), but it seems doesn't work.
Below is codesandbox:
https://codesandbox.io/s/condescending-heisenberg-q8dcr?...
1
vote
3
answers
361
views
How to access values by key from modified React final form
I was making confirmation when the user tried to close the form by modified and values length > 0.
if (modified) {
return (
Object.keys(modified).filter(
(modifiedItem) => ...
1
vote
1
answer
1k
views
Pass a function with predefined parameter to handleSubmit in React
I have a redux-form inside a component "MyEditDataForm" and I am passing a function for handling submit to it like this:
const myHandleSubmit = ({ firstInputFieldName, secondInputFieldName })...
0
votes
0
answers
49
views
Cannot Render a React Class Component that has Inheritance to Another Component. Element type is invalid: expected a string (for built-in components)
Sorry I haven't worked with class components in forever and this is the first time I am trying to inherit from another component. I am currently trying to extend a class component from a node module I ...
0
votes
1
answer
79
views
How to render appropriate dropdown options in redux-forms/final-forms?
I am building the basic country and region form using react and redux-forms.
I am facing the problem of rendering the regions according to the country selected by the user.
How do I pass/tell the ...