React does server-side rendering of staic markup. The static markup may also contain some onclick events. In that case, how does it handle the onclick events.
My thinking:
1) Use the same component js file including handlers for onclick event.
* First serve the static markup using rendertostring() in server.
* Browserify the same file and add in the browserified js file in script tag of that html page.
By this, we both have server-side rendering and also handle events. Is this approach the right one.
React does server-side rendering of staic markup. The static markup may also contain some onclick events. In that case, how does it handle the onclick events.
My thinking: 1) Use the same component js file including handlers for onclick event. * First serve the static markup using rendertostring() in server. * Browserify the same file and add in the browserified js file in script tag of that html page.
By this, we both have server-side rendering and also handle events. Is this approach the right one.