Tag Archives: render

How to view rendered HTML of React component inside JavaScript console

Assume you have defined a React component that has a render function and assign it to variable someReactComponent. Then you can view the rendered version of the React component inside the JavaScript console by doing the following:

Flash[:notice] VS Flash.now[:notice]

Flash[:notice]’s message will persist to the next action and should be used when redirecting to another action via the ‘redirect_to’ method. Flash.now[:notice]’s message will be displayed in the view your are rendering via the ‘render’ method.