Skip to content

v2.3.0

Compare
Choose a tag to compare
@mxstbr mxstbr released this 15 Dec 11:56
· 1947 commits to main since this release
8526f7a

Big changes

Easier contributing

Thanks to @gribnoysup we now have a sandbox for quickly testing changes in the library in a real app! (see #1257) To start contributing locally, run these commands locally and you're all set up:

# Clone the repo locally
git clone git@github.com:styled-components/styled-components.git
# Install the dependencies in the root folder
yarn install # or npm install
# Build the library
yarn run build # or npm run build
# Install the Sandbox app dependencies
cd sandbox
yarn install # or npm install
# Start the sandbox app!
yarn run start # or npm run start

Better support for innerRef when wrapping function components

Function components cannot have refs so our innerRef prop would break when used with withTheme:

Thanks to @MatthieuLemoine, rather than attaching a ref to stateless function components (which results in a warning) we now pass the innerRef prop to it directly for it to handle. (see #1205)

Smaller changes

  • Consistently escape displayNames when creating componentId, thanks to @evan-scott-zocdoc (see #1313)
  • Add basic support for style objects in the Typescript definitions, thanks to @nbostrom (see #1123)
  • Better issue template (see #1342)