I\'ve been away from react native programming for a week and when I got back, after some VSCode updates, I have noticed that many of my super(props)
calls in cl
After looking further into this, it seems that my knowledge of the use of super()
and super(props)
is correct. The issue I am experiencing with super(props)
being marked as deprecated is due to an erroneous deprecation marking in React's TS definitions.
What should've been marked as deprecated was the overloaded form of super, super(props, context)
, which takes a context
prop used by React's legacy context API.
The issue is better described and discussed at this (currently open) issue on Microsoft's TypeScript github page: https://github.com/microsoft/TypeScript/issues/40511
Until the issue is fixed, the deprecation warning can be safely ignored.