The reason for these two posts has been found, because react-redux will load the original tag once before executing the componentDidMount event when loading the page.
Ps. I also tried the componentWillMount incident and the results were the same.
Execution sequence (details):
1. When loading for the first time, the defaultValue of ant control Input has been assigned, but not found, so it is undefined
2. Then execute ComponentDmount/ComponentTwillMount time, and re-assign ss to the defaultValue of Input.
I also output ss on the console, and the results can also verify the above conclusion.
See if this pair has been exported twice? And I only wrote it once in the code
According to the description of input, the page will display the value value on the page only when the input is assigned a value for the first time. no matter how many times the console changes on the page, the value will not affect the display of the page, so the page will always be empty.
Then the question arises, how can I do it on the basis of react-redux framework and add ant tags to initialize and assign Input and display this assignment on the page?
Render will render the first time you enter the page when changing the state, render it once, and then request the data to change the state and render it again!