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

Replacement of $.getJSON #8

Open
mt0s3111 opened this issue Sep 29, 2017 · 2 comments
Open

Replacement of $.getJSON #8

mt0s3111 opened this issue Sep 29, 2017 · 2 comments

Comments

@mt0s3111
Copy link
Contributor

I saw in components the use of $.getJSON async api call, maybe it's better to use Axios (https://www.npmjs.com/package/axios) that also supports Promise. It's just a suggestion, but it could be a good api to use in replace of jquery

@Utzel-Butzel
Copy link
Collaborator

There is also WFPs own AndyJs for Ajax calls, but I have not tried yet. Info is using Axios at the moment.

@redmoonlas
Copy link
Collaborator

You can also use the standard es6 fetch function. You can take care of IE11 with the inclusion of es6-promise and isomorphic-fetch packages.

npm install --save isomorphic-fetch es6-promise

import "isomorphic-fetch"
import promise from 'es6-promise'
promise.polyfill()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants