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

Support om-next #15

Closed
drapanjanas opened this issue Jan 26, 2016 · 1 comment
Closed

Support om-next #15

drapanjanas opened this issue Jan 26, 2016 · 1 comment

Comments

@drapanjanas
Copy link
Owner

Similarily how it is done in original Natal init command.

Open points:

  1. Need to figure out suitable om-next architecture for crossplatform apps to reuse common code. Only UI part should be separate.
  2. What component wrappers to use for om-next? Reagent has function adapt-react-class, but in om-next examples usually use some wrapper library like natal-shell or ktoa has smth similar. Maybe better not to use any by default and let the developer decide?

This is a good excerse to learn om-next basics, so will it take some time. Any proposals on this topic are wellcome.

@drapanjanas
Copy link
Owner Author

OK, here is the first problem:
To enable "yellow box" warnings on screen in ReactNative app you either:

  1. use AppRegistry.registerComponent then your component will be wrapped to support yellow box
  2. use AppRegistry.registerRunnable and pass a function which uses renderApplication, which will wrap your component and will call React.render (same as it is done in registerComponent)
    I was able to use AppRegistry.registerComponent with stateless components (I am following the Quick Start to learn om.next), but it is not possible when you want to attach an om/reconciler. As far as I understand, it is limited by design that reconciler can be only attached to the root element (not to factory, or component class). Therefore you can not use your AppRoot component in any other way, but directly mount it as root with om/add-root!, meaning you can noy use any of the options to make "yellow box" work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant