microsoft / microsoft/BotFramework-WebChat

ReactWebChat - defaultProps will be removed

Open
#4,836 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bot Services bug customer-reported
Dominant language
HTML
Stars
1.8k
Forks
1.6k
Avg merge
22h 58m
Merged PRs (30d)
2

Description

Is it an issue related to Adaptive Cards?

No

Is this an accessibility issue?

No

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

Bundle (webchat.js)

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

No response

Which area does this issue affect?

Development experience

What is the public URL for the website?

No response

Please describe the bug

I am using the react component in version 4.15.9.
I find that I get a lot of alerts like "Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead"
Clearly in future versions of react, defaultProps is going to be removed.

Do you see any errors in console log?
Warning: EventSpy: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Warning: ConnectivityStatusConnecting: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
How to reproduce the issue?

render

What do you expect?

Release a fix to stop using defaultProps

What actually happened?
Do you have any screenshots or recordings to repro the issue?

image

Adaptive Card JSON

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ReactWebChat entry point and search for the EventSpy and ConnectivityStatusConnecting components named in the warning. Identify the function components still using defaultProps and review their existing tests or component usage. Done means rendering ReactWebChat no longer produces the reported defaultProps warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
developer-experience, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.