Skip to content

Commit

Permalink
added deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrowne committed Oct 3, 2019
1 parent b987491 commit 417e5be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# babel-plugin-pure-static-props

## DEPRECATED

This plugin is deprecated in favor of https://github.com/styled-components/babel-plugin-styled-components/pull/248.
It's possible that something other than styled-components might cause a similar issue, in which case this plugin might still be useful, but I won't be maintaining it. (Also, my implementation for babel-plugin-styled-components is a bit more efficient than what I did here.)

---

Fixes an issue with tree shaking that can occur when using static properties on React components using styled-components.

This plugin replaces static property assignments on React components (e.g. `MyComponent.defaultProps = {...}`) with `Object.assign()` statements annotated with `/*#__PURE__*/` comments so that tree-shaking will work correctly.

0 comments on commit 417e5be

Please sign in to comment.