Giter VIP home page Giter VIP logo

reactnativeexperiments's Introduction

Experiments to see if ReactNative will work for us.

Constraints that need to be met for ReactNative to be viable for us:

  • We have an existing application.
  • We want a iOS application to feel like a iOS application, including native navigation stack transitions etc.
    However, our navigation controller does not look like a default UIKit one, e.g. we have no bar, so it might be an option for us to use the x-platform ‘navigator’ component, granted the transition is identical to UIKit’s.
  • Multiple VCs that represents the same resource:
    • Ideally updating one reflects state changes elsewhere in the navigation tree, or even in a different navigation tree (i.e. we have a tab bar where each tab holds a navigation tree)
    • Otherwise, it should at least be possible to have multiple ReactNative views in the navigation tree.

reactnativeexperiments's People

Contributors

alloy avatar

Stargazers

Koen Punt avatar

Watchers

James Cloos avatar  avatar

reactnativeexperiments's Issues

Making UICollectionView based ‘masonry grid’ component size itself.

c1e83a3

What I do is create the collection view + layout (+ view controller) from the shadow view so that I can ask it for its -collectionViewContentSize when the shadow view is asked to determine the view’s size and then later assign it to the component view for hosting.

It works fine, but it feels weird, so just want to check if that’s the best way to do this or if there’s a way I overlooked to access the real component views from the shadow view at the time of layout.

Embedding in existing objc UIKit app.

The Artsy app has a tab bar with navigation stacks with many types of resource VCs (artworks, artists, etc) that though surfing can pretty much get pushed onto the stacks anywhere.

For our RN experimentation we want to start by implementing just 1 resource VC with RN and thus that VC and React view should integrate into the app as if it were any other UIKit based VC.

I have been doing some experimenting and really just wanted to know if this is a good way to go about it, or if I’m doing it completely wrong.

Prototype app setup

This all appears to work fine.

hybrid navigation stack manipulation

Questions

  • Should I not use a single bridge instance for the whole application and/or is there another benefit of having multiple bridge instances? The reasons I do are:
    • Instantiating a bridge can take a while, so less and early is better.
    • I’d like to update state throughout the navigation stack(s). (More about that below.)
  • I’m interested in using Relay and was hoping that that meant that multiple RCTRootView instances that represent the same resource would get updated whenever the resource’s state changes. For instance, consider two VCs in different tabs that each represent the same ‘artwork’. The user ‘likes’ it in 1 navigation tree, switches to the tab with another navigation tree that holds the other VC.
    • However, if I understand it correctly, the various ‘apps’ in the AppRegistry are each root components rather than leafs in the same tree, which gives me the feeling that won’t work. Do you know happen to know if this is the case? (I have no Relay experience yet.)
    • Or if I need to hook this up manually, is there a way to get all live root component instances from the app registry?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.