v6.0.0-rc.0
Pre-release
Pre-release
6.0.0-rc.0 (2023-08-24)
Bug Fixes
- deps: update dependency react-native-svg to v13.13.0 (0d544c6)
Features
- breaking: individual style property override (2c6b553)
The style override is applied at each style key instead of overriding the entire key
Now
const userStyles = {
text: {
fontSize: 14,
backgroundColor: "#ddd",
}
}
const styles = {
text: {
fontSize: 12,
fontWeight: 500,
...userStyles.text,
}
}
// Result
{
text: {
fontSize: 12,
fontWeight: 500,
backgroundColor: "#ddd",
}
}
Before
const userStyles = {
text: {
fontSize: 14,
backgroundColor: "#ddd",
}
}
const defaultStyles = {
text: {
fontSize: 12,
fontWeight: 500,
...userStyles.text,
}
}
const styles = {...defaultStyles, ...userStyles}
// Result
{
text: {
fontSize: 12,
backgroundColor: "#ddd",
}
}
// fontWeight is propery is missing in the old implementation
This could result in some styling issues in your app. This can be solved by passing the correct overriding styles.
Release Notes
- chore(deps): update dependency jest-environment-jsdom to v29.6.4 by @renovate in #482
- fix(deps): update dependency react-native-svg to v13.13.0 by @renovate in #484
- chore(deps): update dependency typescript to v5.2.2 by @renovate in #485
- feat(breaking): individual style property override by @gmsgowtham in #480
Full Changelog: v5.2.0-rc.0...v6.0.0-rc.0