Lookbook v2.0 includes a number of improvements and new features, including:
Support for previewing a range of component types
Preview embeds for including Lookbook previews on external sites
Improved file watching/live updates system with tighter Rails integration to improve reliability and interoperability (including support for forking servers in clustered mode)
This release also includes some naming changes (both in documentation and in code) to help clarify concepts such as preview examples/scenarios and to bring Lookbook close in line with other similar tools.
Finally, this documentation site has been rebuilt and the Ruby API docs are now generated using YARD for easier maintence and updates.
While Lookbook still works great with ViewComponent, it is now possible to create previews for Phlex views and ActionView partials instead of (or alongside!) any ViewComponent previews.
In fact, Lookbook can create previews of anything that can be rendered using Rails’
render helper. All previews will have the same functionality available to them
(preview params, display opions etc) no matter what the component type.
*not quite anything
Lookbook’s file watching system has been completely overhauled and is now much more closely integrated with Rails’ own change detection/code reloading system.
This means that some long-standing issues (such as detecting changes on forked servers with multiple processes running) have been resolved
actioncable gems are now only optional dependencies that can be omitted from production (or entirely!).