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
[Android] No API for updating props on android root component #6303
Comments
@bestander - could you check this out to see if it's reasonable? This is part of getting parity with iOS, cc @mkonicek |
Will do on Tuesday On Sunday, 6 March 2016, Brent Vatne notifications@github.com wrote:
|
🚀 |
@jaredly go for it, we would appreciate this feature. |
ok so my initial attempt was unsuccessful (pretty much doing what I outlined above), and we've decided not to invest in RN yet, so it's unlikely I'll dig into this further in the near future |
No worries, we'll do it eventually. |
mostly immaturity of android, and to a lesser extent iOS. We have large apps that we're thinking of integrating react native into incrementally, which definitely isn't a well-documented use case. we're planning on doing further investigation in a few months and might have a different decision depending on how things have matured. |
👍 |
@bestander What is the status of this feature request? My use case requires inserting a RN view in a native ListView. Removing and creating new react views doesn't allow for smooth scrolling and emitting events with prop updates sends the same props to all children. Is the feature currently being worked on? If not, what might it involve to implement? |
@MikeOrtiz nobody is working on it right now. feel free to send a pull request. |
I want to get a data from Java to JS bundle.putString("value", "aValue"); but, I can not get the value from this.props.value |
It sounds like this issue has played out, and we are keeping issues focused on bugs rather than feature requests at the moment, so I am going to close this issue. Feel free to send a pull request improving this though! |
@brentvatne bump :P this is totally basic for having sane integration with an existing app |
Bump this feature request. @brentvatne Or at least I think the lack of this feature on Android should be mentioned here: https://facebook.github.io/react-native/docs/communication-ios.html It will save people from mistakenly assuming that it exists for Android. |
+1 |
Hi guys. Thank you for the amazing work you are doing with react. Anyway i agree with @tianxind, someone should mention that Android is not ready to update props of a running component. I've lost half of my brain looking for a solution then a came here XD |
Hi, There is a method in ReactRootView called setAppProperties that does what is intended, I believe. |
In iOS, you can do
rctRootView.appProperties = newProps
, and it will update the root view with new props. On android it doesn't seem to be implemented.This behavior is critical for my use case of incrementally adopting react native in a large android app.
I think I want a function like
ReactRootView.updateProps(Bundle props)
that would look something likebased on the startReactApplication fn
Before I made a PR I wanted to check my direction -- does it look reasonable? I think I'll have to store the rootTag on the ReactRootView instance, b/c I can't find anywhere else that it's already stored.
The text was updated successfully, but these errors were encountered: