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

Update components to use React hooks #1

Closed
nitaliano opened this issue Apr 8, 2019 · 5 comments
Closed

Update components to use React hooks #1

nitaliano opened this issue Apr 8, 2019 · 5 comments
Labels
wontfix This will not be worked on

Comments

@nitaliano
Copy link
Contributor

We should update all of our components to move away from class based components to function based and they should use the React hooks API

@sfratini
Copy link
Contributor

sfratini commented Apr 8, 2019

Aren't we forcing people to update their React/RN packages if we do this? Hooks are in v16.8.0 so people are forced to update to RN 0.59. I am not sure a lot of packages are ready to run on 0.59. Maybe we should wait a few RN releases so every package has time to catch up.

facebook/react-native#21967

@ferdicus
Copy link
Member

ferdicus commented Apr 8, 2019

Just my 2 cents

@sfratini: I don't know about this argument. You're basically validating people not updating their dependencies - which people should be doing.

Everyone else should be using previous versions of this lib,
just like they apparently do with their other dependencies.

@sfratini
Copy link
Contributor

sfratini commented Apr 8, 2019

@ferdicus Most of the issues I have had in the past are related to one module asking for a specific version of a module and then others not ready to be upgraded (because let's face it, most people have a lot of modules in their project) and RN usually has a lot of breaking changes, specially in 0.59.

When creating a module I don't think we should be thinking about people only hacing Mapbox in their project...it is a whole ecosystem. So supporting only the latest RN version creates a lot of issues and barriers to new users. Specially when Hooks is a new pattern and does not add any specific feature to the framework. aka it is not needed. I do love hooks tho, and I'd love to use them, I just don't feel a lot of modules are ready for 0.59.

Also, I am not saying people should not update. What I am saying is that if we use a feature that is only available in 0.59 then everyone needs to use that one.

@slaivyn
Copy link

slaivyn commented Apr 18, 2019

We should update all of our components to move away from class based components to function based and they should use the React hooks API

You could pave this long road without forcing the RN upgrade using Recompose, React Hooks "parent" which still can do much than Hooks.
(I am replacing all class based components in all my active projects :) )

@stale
Copy link

stale bot commented Jun 17, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 17, 2019
@stale stale bot closed this as completed Jun 24, 2019
mfazekas pushed a commit that referenced this issue Aug 1, 2019
@mattijsf mattijsf mentioned this issue Feb 20, 2020
mfazekas added a commit that referenced this issue Feb 28, 2022
mfazekas added a commit that referenced this issue Feb 28, 2022
mfazekas added a commit that referenced this issue Mar 4, 2022
mfazekas added a commit that referenced this issue Mar 6, 2022
mfazekas added a commit that referenced this issue Mar 6, 2022
mfazekas added a commit that referenced this issue Mar 6, 2022
sdacunha pushed a commit to sdacunha/maps that referenced this issue Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants