Skip to content

Commit

Permalink
WRQ-20844: Fixed React 18.3 warnings in enact/ui/Layout (#3239)
Browse files Browse the repository at this point in the history
* Fix key spread warning

Enact-DCO-1.0-Signed-off-by: Juwon Jeong ([email protected])

* Replace defaultProps with ES6 default parameters

Enact-DCO-1.0-Signed-off-by: Juwon Jeong ([email protected])

* Use Object.assign when implementing defaultProps

Enact-DCO-1.0-Signed-off-by: Juwon Jeong ([email protected])

* Fix Sprite, Scroller, VirtualList  to show default prop values properly in sampler

Enact-DCO-1.0-Signed-off-by: Juwon Jeong ([email protected])

* Update React to version 18.3.1

Enact-DCO-1.0-Signed-off-by: Juwon Jeong ([email protected])

* Apply review

Enact-DCO-1.0-Signed-off-by: Juwon Jeong ([email protected])

* fixed spreading of key attribute in enact/ui/layout/cell

* temporary eslint fix

* added jsdoc for key prop in enact/ui/layout/cell

* switched key prop to private

* code review fixes

---------

Co-authored-by: Juwon Jeong <[email protected]>
  • Loading branch information
daniel-stoian-lgp and juwonjeong authored May 30, 2024
1 parent ecb1029 commit 3cf15c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/Layout/Cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ const CellBase = kind({
delete rest.shrink;
delete rest.size;

return <Component css={componentCss} ref={componentRef} {...rest} />;
const {key, ...restProps} = {...rest};

return <Component css={componentCss} ref={componentRef} key={key} {...restProps} />;
}
});

Expand Down

0 comments on commit 3cf15c2

Please sign in to comment.