3 ms·
Is your startup using Phoenix liveviews? Front-end development with liveviews isn't something to bet a startup on. The learning curve is a major pain in the a
by Dowwie 3y ago
Is your startup using Phoenix liveviews? Front-end development with liveviews isn't something to bet a startup on. The learning curve is a major pain in the ass once you go beyond hello-world. The community is very small. The lack of up-to-date reference material lends Phoenix liveview development towards the wild frontier of adventure type of development that isn't compatible with 2-week sprints.
Anyone reading this who wants to jump in the ring-- show me how to handle an event triggered by a row in a table accessed through a tab-navigation component, updating the table. As an encore, show me how to carry state from plug middleware to a liveview function. Each situation involves contortions and passing state between steps due to designs yet to be refactored.
- cultofmetatron 3y ago> Is your startup using Phoenix liveviews? nope, liveview didn't exist when I started this startup. its an ios app connected to an elixir api over graphql and channels. > The learning curve is a major pain in the ass once you go beyond hello-world. I made an app in in while back. there's def a bit of a learning curve but its not that crazy. I was able to build a few fairly complex modal workflows in about a day. conceptually, its juts a genserver with a set of frontend components into which you load state. which can send back and forth events. Nothing anyone not familiar with react/redux wouldn't understand. > show me how to handle an event triggered by a row in a table accessed through a tab-navigation component, updating the table. the live view way there if I understand you correctly would be to give each sub component an id that it can pass back to a stateful main component whihc it would then modify in place and autoupdate. in practice, if performance is an issue, you can embed a javscript widget and send only necessary information back and forth using phx-hook. elixir's ecosystem has been great about getting out of your way when its not the best tool for the job.