Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

best-practice way to get formName in props #1007

Closed
fairbairn opened this issue May 19, 2016 · 5 comments
Closed

best-practice way to get formName in props #1007

fairbairn opened this issue May 19, 2016 · 5 comments

Comments

@fairbairn
Copy link

Haven't seen a way to get to the formName that's passed in as form for reduxForm(). Is there a reason it's not available in props the same way formKey is provided?

What's the best way to get to it?

@erikras
Copy link
Member

erikras commented May 19, 2016

Yeah, it's not currently available. But I don't understand where you need it where you don't have it. If you're talking about what you're passing to the decorator, you've already got it in the same file as your component.

@fairbairn
Copy link
Author

It's a nice way to have a pre-defined identifier for the actual form
that we can use downstream for our own purposes. We use a lot of common
internally-built components that are wrapped by reduxForm, and we were
looking for a pleasant and already implemented way of knowing which form
was what. The formName assigned in reduxForm works for us. Would just
be a convenience really, instead of us adding more custom props in other
places in the application to provide the same value.

On 05/19/2016 12:08 PM, Erik Rasmussen wrote:

Yeah, it's not currently available. But I don't understand where you
need it where you don't have it. If you're talking about what you're
passing to the decorator, you've already got it in the same file as
your component.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1007 (comment)

erikras added a commit that referenced this issue May 19, 2016
@erikras
Copy link
Member

erikras commented May 19, 2016

I've added the form name to the props for v6. You can PR the same for v5 if you care enough.

@erikras erikras closed this as completed May 19, 2016
@erikras
Copy link
Member

erikras commented May 24, 2016

Released v6 change as v6.0.0-alpha.14.

@lock
Copy link

lock bot commented Jun 2, 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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants