-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Feature/cleanup react components #282
Feature/cleanup react components #282
Conversation
web-console should only be added during development
* Update to new Signature using RouterContext * Update to new history signature using browserHistory
* now using new Stateless functional components signature
EXCELLENT. One main concern is that we have at least one registered component does the extend React.Component, as we need to make sure the internals of ReactOnRails can handle that. Reviewed 14 of 14 files at r1. spec/dummy/client/app/components/HelloWorldContainer.jsx, line 27 [r1] (raw file): CC: @robwise spec/dummy/client/app/components/HelloWorldContainer.jsx, line 31 [r1] (raw file):
So yes, this could be written as a pure render function, but we're losing test fidelity. BTW, this code looks great! spec/dummy/client/app/components/RouterSecondPage.jsx, line 12 [r1] (raw file): @robwise @alexfedoseev ? Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 3 unresolved discussions. spec/dummy/client/app/components/RouterSecondPage.jsx, line 12 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 3 unresolved discussions. spec/dummy/client/app/components/HelloWorldContainer.jsx, line 31 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 3 unresolved discussions. spec/dummy/client/app/components/HelloWorldContainer.jsx, line 27 [r1] (raw file): BTW decorators waaaay more readable when you need to apply more than one HOC. spec/dummy/client/app/components/RouterSecondPage.jsx, line 12 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 3 unresolved discussions. spec/dummy/client/app/components/HelloWorldContainer.jsx, line 27 [r1] (raw file): @aaronvb Is this from the latest docs? spec/dummy/client/app/components/HelloWorldContainer.jsx, line 31 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 4 unresolved discussions. spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx, line 5 [r1] (raw file): Comments from the review on Reviewable.io |
…onents Feature/cleanup react components
Thanks @lifeiscontent. Nice Job! 👏 |
Review status: all files reviewed at latest revision, 4 unresolved discussions. spec/dummy/client/app/components/HelloWorldContainer.jsx, line 27 [r1] (raw file): // w/ decorators
@doOneThing(withParams)
@doAnotherThing(withAnotherParams)
class Foo { ... }
// w/o decorators
doOneThing(withParams)(doAnotherThing(withAnotherParams)(Foo)) Comments from the review on Reviewable.io |
@alexfedoseev aren't decorators deprecated? That's what I think I've read. |
@lifeiscontent They aren't deprecated, decorator's draft is being reworked and this is why they temporarily removed from Babel. So they're not going anywhere, at least I hope. Review status: all files reviewed at latest revision, 4 unresolved discussions. Comments from the review on Reviewable.io |
@justin808 I updated all the react components in the dummy app to use the new Stateless Functional Components signature
as well as upgrade the new react-router signature