Replies: 6 comments
-
My pull request implementing the idea in the OP is going to land in the RN repo. Perhaps this issue could be used to talk about other ways in which RN could be enhanced for add-on platforms? Otherwise, I may close it. |
Beta Was this translation helpful? Give feedback.
-
Yeah it looks like it landed! 🎉 Thanks for the PR first off - second, I think it may be worth talking about your question in core
I think it would be great, maybe it could be even worth its own page in the Guides, similar to this -> https://facebook.github.io/react-native/docs/0.56/native-modules-setup |
Beta Was this translation helpful? Give feedback.
-
I've made a PR adding a whole new page about this. I also thought it would be worth mentioning the existing platforms that have been made for React Native in the docs as well: |
Beta Was this translation helpful? Give feedback.
-
Regarding support of additional platforms, this is still something that I would love to discuss with interested people and work on the plan going forward. My interest is particularly targeted at supporting different platforms within React Native CLI. Right now, there's "initial" support for external platforms (and their respective commands) via plug-in system. Some code paths are also hard-coded inside I don't really like how the latter ended up evolving from the maintenance perspective and would like to simplify it a bit. It would be great to have a meeting regarding that in order to understand how other platforms integrate with React Native right now, what are the limitations and what would be the expected outcome. Shall I set up a meeting? |
Beta Was this translation helpful? Give feedback.
-
@grabbou did you ever set up a meeting about this? |
Beta Was this translation helpful? Give feedback.
-
Not yet, but it's on our roadmap. We want to improve the integration, especially for the |
Beta Was this translation helpful? Give feedback.
-
Right now (in 0.56 and the first RC of 0.57) you need to modify
jest/hasteImpl.js
andlocal-cli/core/index.js
so Metro and Haste can find your platform's JS files, as can be seen withwindows
(facebook/react-native@5494274) anddom
(facebook/react-native#20393)@matthargett has a pull request in the main RN repo tackling this: facebook/react-native#20662
I have not turned this commit into a PR yet, but I think that an additional "haste" key could be added under a platform's "rnpm" entry in package.json (much like how it works with jest, see here)
Example:
My commit: empyrical/react-native@d7a0c6b (I have opted not to make a PR until more discussion is had)
I think that also whatever way is added to support custom platform plugins makes its way in, there should be some sort of unit test added in with a dummy platform to help ensure that custom platform support is unbroken. A simple little test fixture with the bare minimum files required for a successful bundle to be built. I will probably take a stab at this too.
Beta Was this translation helpful? Give feedback.
All reactions