-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Universal app #37
Comments
I suspect you will have an easier time Browserify-ing |
It depends on what functionalities you are trying to implement. Got provides more functionalities than Ky because Node is a little bit more advanced. I don't recommend using a wrapper because of the differences between them. Use Got when you're targeting Node and use Ky when you're targeting browsers :) |
I think a lot of people will not be able to "just use both" since if you have a universal react app that fetches data or you write shared libraries for server and client to talk to your API, its much easier to just use axios which can be used on both sides. I don't get why it is so hard to make ky universal/isomorphic though, for node-fetch and isomorphic-fetch exists. ky is really cool, but I'm looking for something that works everywhere :( |
@bkniffler when it comes to the basic stuff, sure, an isomorphic approach works. But I absolutely need relative URLs, which I think you will find that if you start using some of the more intermediate/advanced features of these HTTP clients, the isomorphic approach starts to look less and less feasible. I do believe we will get there one dsy, but it's going to take some more spec work at W3C and WHATWG first. Otherwise, libraries will just continue to fake it with lots of inconsistencies and gaps in functionality, which is the current status quo. |
I know we should use Got for node js, but I'm building an universal app that will be rendered on both server/client side, so how should we handle that ?
The text was updated successfully, but these errors were encountered: