echoulen / echoulen/react-pull-to-refresh
Use React.FC instead of React.SFC due to removal in React v18
- Dominant language
- TypeScript
- Stars
- 34
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used [patch-package](https://github.com/ds300/patch-package) to patch `react-js-pull-to-refresh@1.3.0` for the project I'm working on.
Here is the diff that solved my problem:
```diff
diff --git a/node_modules/react-js-pull-to-refresh/dist/src/components/PullDownContent.d.ts b/node_modules/react-js-pull-to-refresh/dist/src/components/PullDownContent.d.ts
index 5921dc8..28d6767 100644
--- a/node_modules/react-js-pull-to-refresh/dist/src/components/PullDownContent.d.ts
+++ b/node_modules/react-js-pull-to-refresh/dist/src/components/PullDownContent.d.ts
@@ -4,4 +4,4 @@ export interface PullDownContentProps {
background?: any;
label?: string;
}
-export declare const PullDownContent: React.SFC;
+export declare const PullDownContent: React.FC;
diff --git a/node_modules/react-js-pull-to-refresh/dist/src/components/RefreshContent.d.ts b/node_modules/react-js-pull-to-refresh/dist/src/components/RefreshContent.d.ts
index c7e1b03..edf61b1 100644
--- a/node_modules/react-js-pull-to-refresh/dist/src/components/RefreshContent.d.ts
+++ b/node_modules/react-js-pull-to-refresh/dist/src/components/RefreshContent.d.ts
@@ -3,4 +3,4 @@ export interface RefreshContentProps {
height?: string;
background?: any;
}
-export declare const RefreshContent: React.SFC;
+export declare const RefreshContent: React.FC;
diff --git a/node_modules/react-js-pull-to-refresh/dist/src/components/ReleaseContent.d.ts b/node_modules/react-js-pull-to-refresh/dist/src/components/ReleaseContent.d.ts
index 8310fbd..5c928a6 100644
--- a/node_modules/react-js-pull-to-refresh/dist/src/components/ReleaseContent.d.ts
+++ b/node_modules/react-js-pull-to-refresh/dist/src/components/ReleaseContent.d.ts
@@ -4,4 +4,4 @@ export interface ReleaseContentProps {
background?: any;
label?: string;
}
-export declare const ReleaseContent: React.SFC;
+export declare const ReleaseContent: React.FC;
```
This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).
----
the above diff is for the `dist/`, but the solution should be a matter of just find-replacing `React.SFC` with `React.FC`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.