Skip to content

Version 3.0

Latest
Compare
Choose a tag to compare
@bsidelinger912 bsidelinger912 released this 11 Dec 06:17
· 4 commits to master since this release

The primary change with v3 is that we drop support for React versions lower than 16.8. This allows Shiitake to be written with hooks. In the re-write I was able to fix several bugs that were hard to deal identify and reason about in a Class Component. I was also able to make some performance improvements, specifically around resize handling and a better debouncing hook. These things could have been done without hooks, but I find hooks make it easy to reason about things and identify opportunities for improvements and flawed logic.

The other big difference is the new "attributes" prop. This allows you to pass any valid JSX attributes (props) into the outer rendered element. This is the same element that is defined by the "tagName" prop. This way you can have more control over the rendered result. We also added classes for some of the inner spans which you can target in css for further control. In this change we dropped support for passing event handlers like "onClick" at the top level Shiitake props, but you can pass them now in attributes. This means any event supported by the tagName of your choice is now supported in addition to other attributes like "title", "href" etc. The top level "className" prop is deprecated in favor of passing className inside of "attributes", but is still supported until the next major version when it will be removed.