Compatibility between React Native and Litho
- Dominant language
- Kotlin
- Stars
- 7.8k
- Forks
- 768
- PR merge metrics
- No merged PRs in 30d
Description
- [x] I have searched [existing issues](https://github.com/facebook/litho/issues) and this is not a duplicate
## Version
Litho 0.13 with React Native 0.55.4 or 0.62.2 (latest)
## Issues and Steps to Reproduce
Hello everyone, I'm trying to integrate Litho in a RN project, but I'm having difficulties.
First, I found [this issue](https://github.com/facebook/litho/issues/355) which contains an example repo with RN with Litho project. I cloned it and was able to run it only as it is (adding a list, not just a single item, as described in the [Litho tutorial](https://fblitho.com/docs/tutorial) shows a blank screen on my Nexus 5X). I then checked [that one](https://github.com/facebook/react-native/issues/27684), but there are no responses there.
Next, I checked [this](https://fblitho.com/docs/faq) in the Litho homepage. With the excludes of the React Native's versions of the Yoga packages, some issues followed. These excludes are not compatible with the latest version of RN 0.62.2 from I saw (project compiles, but I'm getting **App stopped working** on my phone at runtime). Only commeting the excludes and removing the Litho dependencies from the gradle file, makes the project run again with the latest version.
So I've tried quite a few combinations of old version of Litho and RN, but still can't achieve what I need. My test project is located [here](https://github.com/Rokata9/ReactNativeWithLitho). The error I'm currently getting (again, at runtime) is **Invariant violation: Native component for 'RCTView' does not exist** The origin of the error is the imported native CustomCounter component from App.js.
## Expected Behavior
My request: Is it possible for you guys to create some sort of a wiki page / small example project, which points out what are the latest versions of RN and Litho that are compatible with each other (if possible with example of using a native Litho-based component in RN view).
I'm a web developer and use React in the browser every day, but I'm not familiar with Android development, so appologies if the description doesn't make sense at some places. I'll give more info if necessary. Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.