Organizing LiveView
Let's learn how to organize your LiveView using components.
We'll cover the following...
Let’s think through the design considerations for our survey. We may eventually want to display the survey in several different places on the site. You could imagine, for example, wanting to place just the product rating portion of the survey on the show page for a given product or just the demographic details portion on some user profile page. And, as we’ve seen, the dynamic nature of the survey represents a decent amount of complexity.
Both of these considerations push us toward components. Having a dedicated place to put the code related to each portion of our survey will allow us to share these concepts across the site. Also, we’ve said before that ...