dai-shi / react-native-dom-expo

[NOT MAINTAINED] A patch library to make Expo work with react-native-dom
MIT License
26 stars 1 forks source link

Provide guide for contributing #7

Open AlfredOdling opened 5 years ago

AlfredOdling commented 5 years ago

Could you provide a small guide on how to add support for a new module like for example AppAuth so to make it easier for others to contribute?

dai-shi commented 5 years ago

Thanks for pointing out. Yeah, it would be necessary.

I will write up a short memo first in this issue, and get your feedbacks.

Eventually, we'll put the guide in README.md once we are confident.

AlfredOdling commented 5 years ago

Sounds good.

dai-shi commented 5 years ago

Basically we need to provide Expo API for "dom" platform. The current status is shown in https://github.com/dai-shi/react-native-dom-expo#status.

There are three types of implementations.

  1. Proxy to "web" platform: Expo has some probably experimental "web" modules. Some of them can be used in "dom" too. ex. https://github.com/dai-shi/react-native-dom-expo/blob/master/src/NativeLinearGradient.dom.js

  2. "dom" only module. Some of the modules can be implemented simply without native module. ex. https://github.com/dai-shi/react-native-dom-expo/blob/master/src/ExpoAsset.dom.js

  3. "dom" and native module. If you need to interact with DOM, you need to implement a native module that works in the browser main thread. The "dom" module would likely be just a relay to the native module. ex. https://github.com/dai-shi/react-native-dom-expo/blob/master/src/ExponentWebBrowser.dom.js and https://github.com/dai-shi/react-native-dom-expo/blob/master/native/web-browser.js

(Some wording might be polished: I wonder if module is the right word. "dom" and DOM is different but confusing.)

As I write this, I realize that the readers need the basic understanding of react-native-dom as well as react-native-web.

I think it is better to show more examples, and to let one learn from them. Will do.

Meanwhile, could you tell me which part you would like to know more?

dai-shi commented 5 years ago

As I understand more about RNDOM, I refactored most of the code, and the above description is now void.

If anyone is interested in contributing, I'll try writing again.

In the meantime, I appreciate any help for #4.

AlfredOdling commented 5 years ago

I have a suggestion; if we could take a Google Hangouts talk and I'll interview you, and from that conversation, I'll provide a visual/text guide that explains exactly why and why not to use this repo, and how the workflow of contributing will go?

dai-shi commented 5 years ago

Thanks for your wonderful suggestion. That would be good. Please contact me in Twitter DM.