rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 312 forks source link

1.0.4 only do server side rendering #476

Closed skanaar closed 9 years ago

skanaar commented 9 years ago

Upgrading to Rendr 1.0.4 breaks client side rendering of views.

Steps to reproduce 1: install Rendr example _00simple, with version 1.0.4 and required dependencies (handlebars, qs2) 2: load example 3: edit <body> background color to pink 4: click Repos link

Expected behaviour Repos view loads, background stays pink

Actual behaviour Entire page reloads from server, backgrounds reverts to white

bigethan commented 9 years ago

Heya @skanaar - there was a recent change to the Rendr code in 1.0.4 and the examples need an update to get their templating working again. @ingiulio (author of the change) should be along shortly to help :-)

ingiulio commented 9 years ago

Hey @skanaar, could you elaborate more on the step n.3 and how you edit the background color? I'm just trying to get a better understanding of the problem here.

EDIT: I've followed the steps assuming we're just changing the <body> background color from devtools and I see the expected behavior, so I can't really reproduce the issue at the moment.

Thank you

skanaar commented 9 years ago

@ingiulio : I added background: pink the style of the <body> tag in Chrome DevTools. It doesn't have anything to do directly with the problem, it is just to visualise that the entire page is reloaded from server when following any routes.

ingiulio commented 9 years ago

@skanaar cool, that's what I tried to reproduce the issue and it seems to be working fine for me. Can you please try pulling this https://github.com/ingiulio/rendr-examples/tree/addHandlebarsDep and giving it a run? It's the branch I created for the PR that has to go in rendr-examples (https://github.com/rendrjs/rendr-examples/pull/20)

rickysahu commented 9 years ago

@ingiulio Your branch is working as intended. Thanks for updating.

saponifi3d commented 9 years ago

@skanaar thanks for reporting the issue! Sorry about that - PR has been merged. hopefully everything is working fine for you now :)