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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the lor() method in the function component #99

Open
codthing opened this issue Apr 20, 2021 · 11 comments
Open

How to use the lor() method in the function component #99

codthing opened this issue Apr 20, 2021 · 11 comments

Comments

@codthing
Copy link

No description provided.

@gregfenton
Copy link

In my PR for supporting functional components, I modified listenOrientationChange() to support being called via hooks/functional or class components.

@vankhoa01
Copy link

Thank @gregfenton
Your PR was still not merged, so how can I use your changes ?

@gregfenton
Copy link

gregfenton commented Jul 6, 2021

I've been successfully using my PR in production since Sep 2020.

I think you can install my PR with the command

npm install git+https://github.com/gregfenton/react-native-responsive-screen.git

??

In my package.json I end up with the "dependencies" containing:

"react-native-responsive-screen": "github:gregfenton/react-native-responsive-screen"

@vankhoa01
Copy link

vankhoa01 commented Jul 6, 2021

Hi @gregfenton : Thank for your reply
I already installed your package, but I can not resolved currentOrientation
Could you give me some hint to fix them ?

Screen Shot 2021-07-06 at 11 21 31

Thank you so much

@gregfenton
Copy link

Have you tried running any of the examples that ship with the project?

That's where I would start. Those projects each have a README telling you how to set up and run them. If you get the example working, then you can compare your project with the example project to determine what is different.

Maybe start with the example that I added as part of the PR.

@vankhoa01
Copy link

@gregfenton : Thank for your supporting
Let me try with your solution
Thank you so much

@swalahamani
Copy link

@marudy @gregfenton
Still not merged?

@swalahamani
Copy link

swalahamani commented Aug 29, 2021

@gregfenton Typescript support pending?

Argument of type '{ setStateHook: React.Dispatch<React.SetStateAction<undefined>>; }' is not assignable to parameter of type 'Component<any, any, any>'. Object literal may only specify known properties, and 'setStateHook' does not exist in type 'Component<any, any, any>'.ts(2345) (property) setStateHook: React.Dispatch<React.SetStateAction<undefined>> No quick fixes available

@swalahamani
Copy link

@gregfenton Kindly check gregfenton#1

@gregfenton
Copy link

Sorry, I'm unable to maintain this project fork at this time.

@swalahamani
Copy link

swalahamani commented Sep 2, 2021

@gregfenton No worries, thanks for the response and the patch!

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

4 participants