Skip to content

v0.4.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@nolantait nolantait released this 09 Apr 22:05
· 59 commits to master since this release

Overhauls how components public methods work to immediately render which reduces render calls. This provides a number of benefits:

  1. Examples are much cleaner, no unnecessary renders
  2. Delegation becomes easier with (...) args
  3. Phlex creator (joeldrapper) recommends passing rendering blocks to new, allows them to be stored easily
  4. Rails has special handling for render calls that force them into strings, unnecessary calls to render from an ERB context is bad

This patch also has performance improvements for the core classes like Protos::Theme and Protos::Attributes. This library is currently 30x slower than vanilla Phlex. Most of the current impact of Tailwindmerge has been mitigated, exploring making it optional in the future. Performance hit is ~2x for reading with Protos::Theme#[].

What's Changed

Full Changelog: v0.3.0...v0.4.0