Semantic-Org / Semantic-UI-React

The official Semantic-UI-React integration
https://react.semantic-ui.com
MIT License
13.19k stars 4.04k forks source link

chore: remove usage of deprecated `.defaultProps` #4449

Closed tourman closed 6 months ago

tourman commented 7 months ago

This PR:

Fixes #4426.


@layershifter please take a look at the basic changes on https://github.com/Semantic-Org/Semantic-UI-React/issues/4426. If you are fine with them, I'll proceed with the tests. You can review it with the hidden whitespace.

tourman commented 7 months ago

@layershifter oh I see now, that you'd prefer _.defaults instead of just defaults style, using Lodash.

layershifter commented 7 months ago

@tourman thanks for contributing ❤️ It's one of the issue that prevents me from shipping the next beta. However, I am more leaning towards changes proposed in https://github.com/Semantic-Org/Semantic-UI-React/issues/4426#issuecomment-1695396294. To me getDefaultProps() and _.defaults() looks like additional complexity and code debt. WDYT?

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e243fa4) 99.51% compared to head (77f7953) 99.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4449 +/- ## ========================================== - Coverage 99.51% 99.50% -0.01% ========================================== Files 186 186 Lines 3512 3466 -46 ========================================== - Hits 3495 3449 -46 Misses 17 17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.