How to create a standalone library consisting of custom LiveView components which can be further used in multiple projects as a dependency?
You can create a stripped-down phoenix app with the LiveView components in it and then include that as a dependency. Phoenix Live Dashboard does exactly this, and can perhaps serve as a starting point for inspiration.
One thing to perhaps keep in mind is that the assigns handed to the components essentially become part of the public API of the dependency …
2 Likes
I have one that I use for personal projects:
But I include them as a git
dependency, not as a Hex package.
Remember that the Elixir community already as Surface by @msaraiva:
2 Likes