If webpacker is setup in your RoR project, then you can simply use the react_component
function from react-rails
in the same way we would add ruby code to the haml file.
Ex:
%li
= react_component("ReactComponent")
This should work correctly. Webpacker will try to locate the React component in app/javascript/components
by default.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…