Skip to content

Releases: javivelasco/react-css-themr

Say hi to `mapThemrProps`

12 May 11:12
Compare
Choose a tag to compare

This new version brings some bug fixes and a new interesting option: mapThemrProps. It allows you to decide the way you want to pass down props from a component decorated with themr. Apart from other use cases, the most straightforward one is when you are decorating a component that is already decorated and passes down a ref by accepting a different property such as withRef.

In those cases you can customize the prop passing to give withRef instead of ref to the inner component. Please check README for docs and tests for a real use case.

Thank you all 🎉 and specially @raveclassic which is helping a lot with this since months ago

Now with innerRef

08 Feb 21:11
Compare
Choose a tag to compare

This major release includes an important breaking change referenced in #46:

Since assigning string refs is going to be deprecated sooner or later, we should provide refs in as callbacks. Also, accessing instances using the imperative method getWrappedInstance goes against React best practices.

For this from now on we are removing the option withRef and instead you can pass an innerRef prop to the decorated component that will pass down a ref to the decorated component. This makes the API way easier.

Since it's a breaking change, it will be released as a major version.

Enjoy!

Small Fixes

28 Jan 11:26
Compare
Choose a tag to compare

The release 1.7 included a feature to flatten classnames so in case you merge the same className twice it would appear only once. Nonetheless a couple of bugs were introduced that are fixed with this release:

  • Mixing two themes with divergent properties is fixed by this commint.
  • Now there is a safety check to warn about mixing a string value with an object.

Cheers!