chatscope / chat-ui-kit-react

Build your own chat UI with React components in few minutes. Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.
https://chatscope.io
MIT License
1.34k stars 116 forks source link

Using defaultProps is deprecated #119

Closed KDederichs closed 9 months ago

KDederichs commented 1 year ago

Hi, it'd be great if you could switch all the uses of defaultProps with just passing the parameters in the method signature. Using defaultProps is deprecated and spams the console with warnings as well.

AlexShavkuta commented 1 year ago

Hi, Is there any updates on this?

Zakariaels commented 9 months ago

hi @supersnager supersnager , is there any updates on this issue ?

supersnager commented 9 months ago

@KDederichs @AlexShavkuta @Zakariaels I'm almost done. I need to finish rewriting of the last few stories and make some cosmetic changes. I think it'll take me a few of days.

Zakariaels commented 9 months ago

@supersnager, Thanks for your efforts! Don't hesitate if you need some help :)

supersnager commented 9 months ago

Good news! Storybook v7.6.17 has just landed on the site. Now I will do a review of the #120 and merge!

supersnager commented 9 months ago

Finally released, as major version v2.0.3.

@KDederichs Thank you for your effort! @nathanstitt Your issue with class components mentioned here: https://github.com/chatscope/chat-ui-kit-react/pull/120#issuecomment-1922433248 has also been resolved

remoun commented 9 months ago

Hi, I'm using v2.0.3 and still getting a console error saying "Warning: FontAwesomeIcon: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead."

I'm using the code from the Default sample (first one) from https://chatscope.io/storybook/react/?path=/docs/components-maincontainer--docs with NextJS 14.1.0 and React 18.2.0

supersnager commented 8 months ago

@remoun That is a warning from fontawesome. Please see this comment https://github.com/chatscope/chat-ui-kit-react/pull/120#issuecomment-1922433248