GithubHelp home page GithubHelp logo

Comments (7)

elboman avatar elboman commented on April 25, 2024 4

The example I've shown isn't yet a released API, as it's coming in 0.5.0 which will be released soon. I just need to finish some documentation and we should be good to go. Sorry you have to wait a bit longer.

Now sure what you mean, but to change a view state you just need to transition to a new state, and you can trigger transitions from wherever you need, so I'd say yes you can.

I'll ping you here once 0.5.0 is out!

from react.

elboman avatar elboman commented on April 25, 2024 2

Hi,
Passing state or any data from a parent UIView to a child one is not as direct as using React data flow via props. The reason for this is that the UIView is in charge of mounting a container component only when the corresponding state in active. This means that in a way the router treats the views as encapsulated.

This does not mean that it cannot be done, just that right now the API are not very friendly for accomplishing it.

We are moving towards an explicit way of rendering the components as pointed here: #26

This way it would be possibile to pass anything you need to the mounted components (on which you have no control right now since is the UIView thats handles the rendering):

<UIView render={(Component, props) =>
  <Component {...props} user={this.state.user} />
} />

Since this API change allows for so many things that we cannot do right now I guess I should get it done ASAP 😅

from react.

telekid avatar telekid commented on April 25, 2024 1

@ohpyupi just wanted to mention that it appears this feature has been released.

from react.

elboman avatar elboman commented on April 25, 2024 1

yeah, sorry I forgot to update this issue, the feature has been released as @telekid mentioned. Let us know if you need any help!

from react.

ohpyupi avatar ohpyupi commented on April 25, 2024

I appreciate your answer. However, It's not working.... Do I have to update the module? I installed ui-router module through npm.

Also, using that feature, can I change parent view's state from children view? Then, it will be perfect!

from react.

ohpyupi avatar ohpyupi commented on April 25, 2024

Alright. I am looking forward to seeing new feature!! Again I appreciate your answer.

from react.

ohpyupi avatar ohpyupi commented on April 25, 2024

Thanks guys!

from react.

Related Issues (20)

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.