The render() function in ToastManagerComponent lacks the explicit override keyword. While this is optional in standard TypeScript configurations, it triggers an error in projects where noImplicitOverride is enabled in tsconfig.json.
As described by the docs, using the override modifier is a best practice for class-based components as it ensures the method remains in sync with the base class (in this case React Component).
|
render() { |
|
const { isVisible, position, useModal } = this.state; |
should become:
override render() {
const { isVisible, position, useModal } = this.state;
The
render()function inToastManagerComponentlacks the explicitoverridekeyword. While this is optional in standard TypeScript configurations, it triggers an error in projects wherenoImplicitOverrideis enabled in tsconfig.json.As described by the docs, using the
overridemodifier is a best practice for class-based components as it ensures the method remains in sync with the base class (in this case ReactComponent).toastify-react-native/components/ToastManager.tsx
Lines 413 to 414 in 17a44eb
should become: