Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upasync/await - Parsing error: Unexpected token => (null) #528
Comments
This comment has been minimized.
This comment has been minimized.
|
Totally unrelated but I couldn't help myself, you don't need to export function loadThings (creds) {
return async (dispatch, getState) => {
return await fetch('http://localhost/api/things')
}
}Anyways, you need to use the babel-parser to use ESnext syntax, see here: https://github.com/feross/standard#can-i-use-a-custom-js-parser-for-bleeding-edge-es6-or-es7-support |
This comment has been minimized.
This comment has been minimized.
|
@LinusU The code is actually out of context. Got it from a demo source and stripped it. But thanks for the advice. There's some additional error handling in the |
This comment has been minimized.
This comment has been minimized.
|
Cool, I happened to press send a bit early, did you see the solution to your problem? |
This comment has been minimized.
This comment has been minimized.
|
I did now :) |
purepear
closed this
May 24, 2016
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
purepear commentedMay 24, 2016
•
edited