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

Update read me example: "cloneWithProps is deprecated" #61

Closed
jadsonlourenco opened this issue Jul 29, 2015 · 9 comments
Closed

Update read me example: "cloneWithProps is deprecated" #61

jadsonlourenco opened this issue Jul 29, 2015 · 9 comments

Comments

@jadsonlourenco
Copy link

https://facebook.github.io/react/docs/clone-with-props.html

Can be:

if (navBar) {  
  // Replace it
  //navBar = React.addons.cloneWithProps(navBar, { navigator, route, });

  // New way
  navBar = React.cloneElement(navBar, { navigator, route, });
}

Is just a detail that help us on begin (copy/paste/test 😁).
Any way thanks for this component.

@Kureev
Copy link
Owner

Kureev commented Jul 29, 2015

Thanks for notice that! Mb you want to compose a pull request?

@jadsonlourenco
Copy link
Author

Hi @Kureev I don't know your "rules" to pull, and this issue is easy to change only on read me for now, then I can change on "examples" files, etc.

But you can add on read example how I can push new route? onPrev={() => this.navigator.pop();} but not work.

@Kureev
Copy link
Owner

Kureev commented Jul 29, 2015

New syntax (i.e. navBar = React.cloneElement(navBar, { navigator, route, });) for RN 0.8.0+?

@jadsonlourenco
Copy link
Author

Yes, I'm using RN 0.8.0, but I don't know if this new syntax start by this version, but is good to be updated with current version of RN, if not broken the old.

@Kureev
Copy link
Owner

Kureev commented Jul 29, 2015

It seems there are a lot of improvements since 0.8, probably I'll create an explicit branch for that and merge it into master when 0.9 would be released.

@jadsonlourenco
Copy link
Author

Yes, I think the same, so do that, I fork now, and I will send a pull on night.

@chirag04
Copy link
Contributor

@Kureev 0.9 RC is already out for long. Should we update anything here?

@Kureev
Copy link
Owner

Kureev commented Aug 11, 2015

I wasn't expect they to be so fast. Yeah, we definitely need to align the code with current stable release

@Kureev
Copy link
Owner

Kureev commented Aug 11, 2015

Done.

@Kureev Kureev closed this as completed Aug 11, 2015
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

3 participants