react-component / react-component/select
strict mode warnings
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
I am getting a lot of warnings in strict mode. See the developer console here: https://codesandbox.io/s/strict-mode-warnings-u3qos
sandbox.ef5a8de3.js:1 Warning: Unsafe lifecycle methods were found within a strict-mode tree:
in StrictMode (created by App)
in App
componentWillMount: Please update the following components to use componentDidMount instead: Trigger
componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Trigger
Warning: Legacy context API has been detected within a strict-mode tree:
in StrictMode (created by App)
in App
Please update the following components: Trigger
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of SelectTrigger which is inside StrictMode. Instead, add a ref directly to the element you want to reference.
in div (created by Select)
in Trigger (created by SelectTrigger)
in SelectTrigger (created by Select)
in Select (created by App)
in div (created by App)
in StrictMode (created by App)
in App
Do you have any plans on fixing those?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the warnings in the linked CodeSandbox, then trace the Trigger and SelectTrigger components named in the console output. Review their lifecycle methods, legacy context usage, and findDOMNode call, and verify that the reported StrictMode warnings no longer appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100