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

WIP: Implement one Vue component #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

WIP: Implement one Vue component #3

wants to merge 2 commits into from

Conversation

nicksellen
Copy link
Contributor

This is a proof-of-concept to see what migrating to Vue might look like.

It just implements a single small component (one volunteer post on the group volunteer page). This replaces the existing one.html template with one.vue component.

I created Iznik.VueView base class for backbone views that will render a Vue component. This should allow seamless migrations as you can replace one component at a time, without touching the rest of the page.

The idea would be to then implement bigger and bigger components that use the smaller ones, slowly removing the backbone controllers and views as it goes up the view hierarchy.

This PR does not address how to handle data fetching/refreshing/actions inside Vue components, it just delegates to the existing backbone controllers for that. Vue events are mapped to backbone view actions so it works in a similar way to the existing backbone views.

There are many approaches to state management in Vue, and some would involve much bigger changes (e.g. centralized state management like Vuex), other solutions would be more similar to the current setup (e.g. actions/lifecycle events in the vue components to do data fetching).

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.

1 participant