Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use React.FC instead of React.SFC due to removal in React v18 #38

Open
ckknight opened this issue Aug 22, 2022 · 0 comments
Open

Use React.FC instead of React.SFC due to removal in React v18 #38

ckknight opened this issue Aug 22, 2022 · 0 comments

Comments

@ckknight
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used 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 --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<PullDownContentProps>;
+export declare const PullDownContent: React.FC<PullDownContentProps>;
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<RefreshContentProps>;
+export declare const RefreshContent: React.FC<RefreshContentProps>;
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<ReleaseContentProps>;
+export declare const ReleaseContent: React.FC<ReleaseContentProps>;

This issue body was partially generated by patch-package.


the above diff is for the dist/, but the solution should be a matter of just find-replacing React.SFC with React.FC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant