From 325ffc129064bd748268d43578261643a6b70f19 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Sat, 10 Jul 2021 10:16:54 +0200 Subject: [PATCH] More 'stict:true' mode compatibility for React 17 --- CHANGELOG.md | 5 +++++ src/REvent.tsx | 2 +- src/style/RBase.tsx | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06a77cc8..da4aef7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [1.0.4] 2021-07-10 + +Fix #3: Path to the example css for the layers control +Fix #4: More tsc `strict: true` mode compatibility fixes for React 17 + ### [1.0.3] 2021-06-24 Fix #2: Support importing from tsc with `strict: true` diff --git a/src/REvent.tsx b/src/REvent.tsx index a8aa4c05..5b4cd794 100644 --- a/src/REvent.tsx +++ b/src/REvent.tsx @@ -62,7 +62,7 @@ export class RlayersBase extends React.PureComponent { return false; } - componentDidUpdate(prevProps: P, prev: null, snap: unknown): void { + componentDidUpdate(prevProps: Readonly

, prev: Readonly, snap: unknown): void { if (this.props !== prevProps) { debug('willRefresh', this, prevProps, this.props); this.refresh(prevProps); diff --git a/src/style/RBase.tsx b/src/style/RBase.tsx index e7da46b6..db0508f2 100644 --- a/src/style/RBase.tsx +++ b/src/style/RBase.tsx @@ -56,7 +56,11 @@ export default class RBase

extends React.PureComponent< this.set(this.ol); } - componentDidUpdate(prevProps: P, prevState: null, snapshot: unknown): void { + componentDidUpdate( + prevProps: Readonly

, + prevState: Readonly, + snapshot: unknown + ): void { if (prevProps !== this.props) this.refresh(prevProps); }