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

Express server rendering #313

Merged
merged 2 commits into from
Aug 2, 2016
Merged

Express server rendering #313

merged 2 commits into from
Aug 2, 2016

Conversation

justin808
Copy link
Member

@justin808 justin808 commented Aug 1, 2016

Fixes to reenable express server rendering.


This change is Reviewable

@justin808
Copy link
Member Author

@robwise Please review.

@robwise
Copy link
Contributor

robwise commented Aug 1, 2016

:lgtm:

this thing is becoming a giant confusing mess, so it's good that we're now trimming the fat (recommending against express server).

However, adding comments with code examples only to say that the example code wrote won't work is going in the wrong direction.


Reviewed 1 of 1 files at r1, 7 of 7 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions.


client/index.pug, line 19 [r2] (raw file):

    //  ReactOnRails.reduxStore('routerCommentsStore', !{props});
    // script.
    //  ReactOnRails.render('RouterApp', !{}, 'app');

keep something about how we are doing a special start up because we're client-side only, but including the stuff above actually makes this substantially more confusing


client/server-express.js, line 34 [r2] (raw file):

  sleep.sleep(1);
  res.setHeader('Content-Type', 'application/json');
  res.send(JSON.stringify({ comments }));

j/c why this change?


client/webpack.client.express.config.js, line 15 [r2] (raw file):

  // Shouldn't be necessary:
  // https://github.com/shakacode/react_on_rails/issues/504
  './app/bundles/comments/startup/ClientRouterAppExpress',

delete this. let's think of ways to make this repo more concise instead of cramming more stuff in


client/app/bundles/comments/startup/ClientRouterAppExpress.jsx, line 2 [r2] (raw file):

// Compare to ../ServerRouterApp.jsx
// This

// This?


Comments from Reviewable

@justin808
Copy link
Member Author

Review status: all files reviewed at latest revision, 4 unresolved discussions.


client/index.pug, line 19 [r2] (raw file):

Previously, robwise (Rob Wise) wrote…

keep something about how we are doing a special start up because we're client-side only, but including the stuff above actually makes this substantially more confusing

I'm just saying this is how it could be done...

client/server-express.js, line 34 [r2] (raw file):

Previously, robwise (Rob Wise) wrote…

j/c why this change?

Old code was wrong.

client/webpack.client.express.config.js, line 15 [r2] (raw file):

Previously, robwise (Rob Wise) wrote…

delete this. let's think of ways to make this repo more concise instead of cramming more stuff in

delete this? Then rest of this PR won't work.

client/app/bundles/comments/startup/ClientRouterAppExpress.jsx, line 2 [r2] (raw file):

Previously, robwise (Rob Wise) wrote…

// This?

yep -- delete that line

Comments from Reviewable

@justin808 justin808 force-pushed the express-server-rendering branch from 94c72bd to 175fb30 Compare August 1, 2016 09:13
@justin808
Copy link
Member Author

Maybe we merge this in, and then do another PR that removes the express-server rendering?


Review status: 7 of 8 files reviewed at latest revision, 4 unresolved discussions.


Comments from Reviewable

@robwise
Copy link
Contributor

robwise commented Aug 1, 2016

Reviewed 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


client/server-express.js, line 34 [r2] (raw file):

Previously, justin808 (Justin Gordon) wrote…

Old code was wrong.

how revealing

client/webpack.client.express.config.js, line 15 [r2] (raw file):

Previously, justin808 (Justin Gordon) wrote…

delete this? Then rest of this PR won't work.

your comment says it shouldn't be necessary and links to an issue regarding how something isn't implemented

Comments from Reviewable

@justin808
Copy link
Member Author

Review status: all files reviewed at latest revision, 2 unresolved discussions.


client/server-express.js, line 34 [r2] (raw file):

Previously, robwise (Rob Wise) wrote…

how revealing

do I sense sarcasm?

client/webpack.client.express.config.js, line 15 [r2] (raw file):

Previously, robwise (Rob Wise) wrote…

your comment says it shouldn't be necessary and links to an issue regarding how something isn't implemented

OK -- delete the comment, not file?

Comments from Reviewable

* Had to work around no shared store support
* See shakacode/react_on_rails#504
@justin808 justin808 force-pushed the express-server-rendering branch from 175fb30 to a65fb5e Compare August 2, 2016 05:41
@justin808 justin808 merged commit 38b77aa into master Aug 2, 2016
@justin808 justin808 deleted the express-server-rendering branch August 10, 2016 05:31
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

Successfully merging this pull request may close these issues.

3 participants