ssorallen / turbo-react

A JavaScript library that transitions between static HTML pages on navigation; no app server required.
https://turbo-react.herokuapp.com/
Apache License 2.0
274 stars 16 forks source link

Changed the api for applyDiff to apply diffs on not only the body elemen. #5

Closed hallgren closed 9 years ago

hallgren commented 9 years ago

The propose is to be able to split a page in sections and apply the Reactize pattern on them.

ssorallen commented 9 years ago

This is an interesting idea and reminds me of jquery-pjax. I'd like to keep Turbolinks in turbo-react because my intention was for this library to enable DOM mutations without any changes on the server. If you'd like to go down the partial update route, I think the PJAX approach, which uses a custom X-PJAX HTTP header on the request for the partial, leads to a simpler API than requiring a second URL.

Try an API similar to PJAX because PJAX is an opt-in feature that won't break the otherwise Turbolinks style "set it and forget it" API of Reactize.

hallgren commented 9 years ago

hm I think I´ve done something stupid then I created the PR. My intention was to only modify the api of reactize.js and a small change in turbolinks. Not remove the turbolink... =(

I like your turbo-react as is and just wanted to change the api for reactize.js to make it work with the stuff I´m fiddling around with.

I close this and try again, sorry.

ssorallen commented 9 years ago

No worries, and thanks for the changes.