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

Immutable Form Submit error v6 #881

Closed
NgoKnows opened this issue Apr 29, 2016 · 9 comments
Closed

Immutable Form Submit error v6 #881

NgoKnows opened this issue Apr 29, 2016 · 9 comments
Labels
Milestone

Comments

@NgoKnows
Copy link

When trying to call handleSubmit like in the example, I get this error
Uncaught TypeError: Object.values is not a function
I'm not sure what could be causing this. I am using v6 alpha.6

@ooflorent ooflorent added the bug label Apr 29, 2016
@ooflorent
Copy link
Contributor

v6 uses Object.values but to use the runtime transform from Babel. Object.values is a new addition to EcmaScript specification (ES2017) and may not be implemented in all browsers (currently it is only available in FF 47).

Use have to manually provide the polyfill using:

import "babel-polyfill"

@erikras Is it the expected behavior? Do you want v6 to depend on the polyfill? Maybe we should consider using lodash or an internal helper for this.

@ooflorent ooflorent added this to the next-6.0.0 milestone Apr 29, 2016
@kristian-puccio
Copy link

Does anyone write react anymore without babel?

On 29 April 2016 at 16:05, Florent Cailhol notifications@github.com wrote:

v6 uses Object.values but to use the runtime transform from Babel.
Object.values is a new addition to EcmaScript specification (ES2017) and
may not be implemented in all browsers (currently it is only available in
FF 47).

Use have to manually provide the polyfill using:

import "babel-polyfill"

@erikras https://github.com/erikras Is it the expected behavior? Do you
want v6 to depend on the polyfill? Maybe we should consider using lodash
or an internal helper for this.


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

@ooflorent
Copy link
Contributor

@kristian-puccio Using Babel does not involve using the polyfill nor the runtime transform!

@kristian-puccio
Copy link

Sorry your correct, we can probably assume people will use babel to get to
es2015 but I guess assuming es2016 is probably a stretch.

On 29 April 2016 at 16:15, Florent Cailhol notifications@github.com wrote:

@kristian-puccio https://github.com/kristian-puccio Using Babel does
not involve using the polyfill nor the runtime transform!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#881 (comment)

@ooflorent
Copy link
Contributor

And Object.values is ES2017 (but stage 4)!

@erikras
Copy link
Member

erikras commented Apr 29, 2016

Easy fix. I'll move it back to Object.keys(). Already committed, but not ready for push yet.

erikras added a commit that referenced this issue May 4, 2016
erikras added a commit that referenced this issue May 4, 2016
* arrays:
  implemented field arrays
  removed Object.values usage. fixes #881
  start work on array fields
@erikras
Copy link
Member

erikras commented May 4, 2016

Fix published as v6.0.0-alpha-7.

@jedwards1211
Copy link
Contributor

@kristian-puccio just a note, I try to avoid using babel-polyfill if I can help it, and rely on babel-runtime only (which unfortunately isn't possible with redux-form right now)

@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
Projects
None yet
Development

No branches or pull requests

5 participants