Docs `getFormNames` Outdated?
See original GitHub issueWhat is the current behavior?
The current selector’s docs state that getFormNames
has the following definition: getFormNames() returns (state) => formNames:Array
.
However, the example shows otherwise:
MyComponent = connect(
state => ({
...
names: getFormNames('myForm')(state),
...
})
)(MyComponent)
What is the expected behavior?
The example should reflect the definition of the selector.
Other informations
I know it’s not a jaw-dropping bug, but some fellow developers might find that confusing when going the first time through it.
While we are at the selector’s doc, I would add up one more info piece to that doc page: How to use those selectors if you are passing the form name as a prop to your component? Which would go something like this, for example let’s take the getFormValues
:
import {
getFormValues,
} from 'redux-form'
const myGetFormValues = (form, state) => (getFormValues(form))(state);
MyComponent = connect(
(state, initialProps) => ({
values: myGetFormValues(initialProps.form, state),
})
)(MyComponent)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Selectors - Redux Form
Returns the form submit validation errors. getFormNames() returns (state) => formNames:Array. Gets the names of all the forms currently managed by ...
Read more >ValidateThis - Google Groups
Is the documentation site for Validatethis.org gone? The old docs are preserved here, ... How to call getFormName. Thanks a lot John.
Read more >GenericFormHandler (ATG Java API) - Oracle Help Center
String, getFormName() ... used to automatically detect an error and redirect to the error page when your session has expired since the form...
Read more >RuntimeAccordionPanel - Servoy 2020 Documentation
String, getFormName(), Returns the name of the form. ... tabIndex is updated after form is shown (so onShow of form will have the...
Read more >Grav API - Grav Documentation
Deletes the old out of date file-based caches. public, save(string $id, array/object $data, int $lifetime=null) : void. Stores a new cached entry.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is no
getFormNames
at all in6.5.0
. Just tried as seems I need it 😃https://github.com/erikras/redux-form/blob/v6.5.0/src/index.js
However it seems that in the new version we would have such selector: https://github.com/erikras/redux-form/blob/master/src/index.js
Is there any
6.5.0
alternative?Looking forward!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.