Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the proposals in #10 to optimize for the common case of referentially-transparent style factory functions. I was able to keep the manual
:key
support by updating style factories to skip CSS compilation whennil
is passed as the style name. In addition, style factories no longer have to be invoked withapply
, passing params as a vector and then individually after; we just unpack the params vector via alet
in the generated code.There are some breaking changes to the StyleContainer protocol, but I would imagine that is a fairly transparent change to most clients.
apply