-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update react-select to version 3 #819
Conversation
option => has(option, 'value') && option.value === props.value | ||
) || null, | ||
selectedOptions: | ||
props.isMulti && props.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed to add && props.value because when you clear multi select now, it sends null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to remove this since we will wrap the breaking change
"treeshaked": { | ||
"rollup": { | ||
"code": 354503, | ||
"import_statements": 910 | ||
"code": 429358, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this goes up, but hopefully it's a win due to not shipping two versions of emotion 🤷♂ 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, but shouldn't that make the bundle size go down?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think size snapshot includes dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, alright, then it makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure how size snapshot works to be honest. But I wouldn't hold back a dependency update just to save a few kb 🤷♂
I'll do the react-testing-library update in another pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👌
AsyncCreatable as AsyncCreatableSelect, | ||
} from 'react-select'; | ||
import { components as defaultComponents } from 'react-select'; | ||
import AsyncCreatableSelect from 'react-select/async-creatable'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are they doing this on purpose to have better treeshaking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah
this is what they said
"This should have no bundle-size impact on react-select consumers currently leveraging tree-shaking. However for consumers who aren’t leveraging tree-shaking, this should help alleviate some of the bundle-weight."
6fb573f
to
2270721
Compare
Summary
Updates dependency
react-select
to version 3.See this issue for more details on the changes
The main advantage for us is that with version 3, react-select now relies on @emotion 10. This means we won't be shipping two versions of emotion.
I'll update some other deps here too