Skip to content

Reasoning for removing promise support? #425

Answered by claudiodekker
grantholle asked this question in Help
Discussion options

You must be logged in to vote

Right, so, there's both a short answer and a long answer to this question.

The short answer

We're not removing Promises entirely. Promises are great, and we even encourage using them in some ways, we just don't want people to chain them on the end of a visit.

The long answer

There's multiple reasons:

  • Chaining promises onto the end of an Inertia.visit more or less relies on the side-effect of us returning the Axios request. If we at any point decide to change the way Inertia works internally in any way (which we are, hence the deprecation warning), it would/could affect everyone's promises, which is a situation we really want to avoid if we don't have to.

  • We want to make it super clear…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by grantholle
Comment options

You must be logged in to vote
1 reply
@claudiodekker
Comment options

Comment options

You must be logged in to vote
2 replies
@claudiodekker
Comment options

@robsontenorio
Comment options

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