question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs `getFormNames` Outdated?

See original GitHub issue

What 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:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
PavelPolyakovcommented, Mar 14, 2017

There is no getFormNames at all in 6.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!

0reactions
lock[bot]commented, Aug 4, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found