Closed haszari closed 7 years ago
Yes all you have to do is include the scripts in the generated HTML
Thanks – works great. I also needed to call renderToString
instead of renderToStaticMarkup
(of course).
Just in case someone sees this in the future, you have to add some extra code to make it happen. This article helped me fix the issue on my project: https://jaketrent.com/post/react-routing-static-site-browser/
Apologies if this is a silly question.. is it possible to use react for client-side logic in the generated site?
For example, have a click handler for a button which logs to console (or sets state).
I can imagine why this might not be supported. Can anyone suggest good ways to implement simple client-side logic/behaviour in my generated site?