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

[1.x] Use Inertia's [only] lazy evaluation #250

Closed
wants to merge 1 commit into from

Conversation

ninjaparade
Copy link
Contributor

This PR updates the put request for updating the team name to take advantage of the lazy evaluation that Inertia offers outlined here https://inertiajs.com/responses#lazy-evaluation

This change will allow Inertia reduce the number of quieres needed to render the view.

@ninjaparade ninjaparade marked this pull request as draft September 21, 2020 19:18
@taylorotwell
Copy link
Member

Seems sensible.

@ninjaparade
Copy link
Contributor Author

@taylorotwell I'll try to find a couple other spots that can use this optimization before completing this.

@@ -82,8 +82,9 @@

methods: {
updateTeamName() {
this.form.put('/teams/' + this.team.id, {
preserveScroll: true
this.form.put(`/teams/'${this.team.id}`, {
Copy link
Contributor

@chrysanthos chrysanthos Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra quote here.

Suggested change
this.form.put(`/teams/'${this.team.id}`, {
this.form.put(`/teams/${this.team.id}`, {

@driesvints driesvints changed the title use Inertia's [only] lazy evaluation [1.x] use Inertia's [only] lazy evaluation Sep 22, 2020
@driesvints driesvints changed the title [1.x] use Inertia's [only] lazy evaluation [1.x] Use Inertia's [only] lazy evaluation Sep 22, 2020
@taylorotwell
Copy link
Member

Re-open when ready.

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

Successfully merging this pull request may close these issues.

None yet

3 participants