Upstreaming the hooks into the Official RN Camera
We've been planning to migrate to hooks for a long time, and we found this codebase that is a good code design and an easy developer experience to use, so we propose that this repo codebase be moved into the RN Camera Official Repo as the canonical source.
I discussed with @sibelius and he encouraged the idea.
Maybe there are a few things that need to be improved:
- Improve TS support
- Total removal Flow from RN Camera
What do you think?
You can view a lot of Pull Requests trying to implement hooks, maybe you could implement it as one more option.
That could really makes sense and I agree with both of your points. I don't see too much of a benefit besides removing the "soon" deprecated lifecycle methods and re-organizing the code.
I suggest that we convert RNCamera.js to a TypeScript + functional component and then implement the necessary hooks step by step. That way, we keep legacy support until we can make a major version bump and also remove flow. Or do you have a better idea? @mauriciord
And what do you think about the support for expo?
@reime005
I suggest that we convert RNCamera.js to a TypeScript + functional component and then implement the necessary hooks step by step. That way, we keep legacy support until we can make a major version bump and also remove flow. Or do you have a better idea?
I think it works :-)
And what do you think about the support for expo?
We can import the hooks of react native camera into the expo-camera, because they probably will be unified in the future.