redrabbit / git.limo

A Git source code management tool powered by Elixir with easy installation & high extensibility.
https://git.limo
MIT License
497 stars 42 forks source link

Rewrite React/Relay components with Phoenix.LiveView #47

Closed redrabbit closed 5 years ago

redrabbit commented 5 years ago

We have started the liveview branch a while ago for this purpose.

Phoenix.LiveView is still very experimental. Currently, our React/Relay implementation performs better (no need to double-fetch resources) and feels less cumbersome.

Here's a list of React component to rewrite:

redrabbit commented 5 years ago

After experimenting with Phoenix.LiveView, I don't think this is the right thing for this project.

We rely on Javascript for a few things:

I see what cool things people have been creating with it but I don't think it would be provide any benefits for most of our uses-cases.

Our current JS stack is based on React and Relay. GitGud.Web.ReactComponents makes it very easy to render React components by passing a list of props. Having a bunch of React components and various hooks executed when the DOM is ready is also quite handy.

Most of the time, we don't need to keep an open connection to the server and pass data around.

With the exceptions of <Issue /> which is the most complex component so far (using Phoenix.Presence and GraphQL subscriptions over Phoenix.Channel) and <CommitReview /> (using GraphQL subscriptions as well).

Our GraphQL backend provides support for subscriptions which covers our needs quite well so far.

Now there are a few things that would be really nice with Phoenix.LiveView (such as client-side form validation) but I don't thing it worse the effort.

redrabbit commented 3 years ago

Version 0.3.6 did deprecate all the React components by replacing all of them with LiveView counterparts :heart: