Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace defaultProps #120

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Conversation

KDederichs
Copy link
Contributor

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

@supersnager
Copy link
Contributor

@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.

@akatzfey1
Copy link

+1 for this change to be merged

@supersnager
Copy link
Contributor

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

@nathanstitt
Copy link

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: FortAwesome/react-fontawesome#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.

@supersnager supersnager merged commit 1caac48 into chatscope:master Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using defaultProps is deprecated
4 participants