chat-ui-kit-react icon indicating copy to clipboard operation
chat-ui-kit-react copied to clipboard

Replace defaultProps

Open KDederichs opened this issue 11 months ago • 4 comments

Fixes #119 by replacing all the default props with standard JS default values

KDederichs avatar Jul 20 '23 11:07 KDederichs

@KDederichs Thank you for your work. I want to merge it, but I have a problem with Storybook docs - it doesn't generate default values when there are no defaultProps. I'm checking what's wrong. Probably Storybook needs to be upgraded, I'll merge this PR when I will found what's going on with Storybook.

supersnager avatar Aug 22 '23 11:08 supersnager

+1 for this change to be merged

akatzfey1 avatar Jan 22 '24 21:01 akatzfey1

@akatzfey1 Please be patient, the Storybook upgrade is almost done.

supersnager avatar Jan 23 '24 14:01 supersnager

Hey @akatzfey1 and @supersnager thanks very for your work on this.

I also got tired of the console.log litter and pulled in your branch and cut a release of it for our project. I did run into a few issues with class components still using DefaultProps and requiring the props passed to the component to be passed unmodified into the super class. This commit corrects them.

If anyone else wants to use the fork until @supersnager completes the storybook upgrade I've published it to @nathanstitt/chat-ui-kit-react

I do still see one warning though, chat-ui-kit-react uses FontAwesomeIcon which also uses defaultProps it also has a PR to correct it but no response yet on it: https://github.com/FortAwesome/react-fontawesome/pull/551

I may tackle that one next but only one warning is at least manageable, before the console was pretty useless and we were missing hydration errors.

nathanstitt avatar Feb 01 '24 22:02 nathanstitt