Closed hallgren closed 9 years ago
I was hoping to keep turbo-react a drop-in library for transitioning between pages, so I'd like to keep the applyBodyDiff
the default behavior. I do think it can support config though, something like the way Google Analytics enables config:
<script>
(function(a) {
a.config = { applyBodyDiff: false };
}(window.Reactize || {}))();
</script>
<script src="/dist/reactize.min.js"></script>
Reactize would update to first look for a global Reactize
object and see if a config exists that it should use. This will let you disable it and still keep the library as a drop-in tool.
Thanks for the suggestion. I am going to close this due to the reasons I listed in my previous comment. If you want to try out a config like I mentioned, I would look at merging something similar.
I think you have a great aim with this project and I think I need to create a fork and make my changes there. For example I don´t use turbolinks and I want to control parts of the page not only the body tag.
I hope its ok if I steal your ideas and make some adjustments?
Definitely. I released this with an Apache License, so have at it. I'm interested to see where you go with this as well.
Cool, thanks!
The http://reactize-todo.herokuapp.com use the applyDiff directly on elements in the DOM and the applyBodyDiff breaks it.