Skip to content

Do you think the Svelte API / pattern of use could be improved? #997

Answered by kitten
ispyinternet asked this question in Q&A
Discussion options

You must be logged in to vote

We opt not to wrap urql's Client ever because that introduces confusion around what the client is and what its methods currently are. That being said our Svelte bindings are purely experimental and stand-ins as there are (imho) deep problems with Svelte's reactive model, to the point where most code just opts to use await, which isn't optimal.

What you're describing however is already possible. You can actually use query directly without instantiating it first into a separate variable for instance. The reason why this is done currently is precisely because of Svelte's shortcoming in how subscribables are handled

The problem is that whenever it changes it loses all its state and currently …

Replies: 3 comments 29 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
17 replies
@kitten
Comment options

@ispyinternet
Comment options

@ispyinternet
Comment options

@ispyinternet
Comment options

@kitten
Comment options

Answer selected by kitten
Comment options

You must be logged in to vote
12 replies
@ispyinternet
Comment options

@kitten
Comment options

@ispyinternet
Comment options

@ispyinternet
Comment options

@ispyinternet
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants