Components aren't rendering because of the Uncaught ReferenceError error. The error is thrown in one of the React API files (see the code in question below). I'm using the react-rails gem and am trying to render a blank component called 'Test'.
The file from React API(line 3)
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react.production.min.js');
} else {
module.exports = require('./cjs/react.development.js');
}
ERB Rendering Component
<div style="width:100vw">
<%= react_component('Test') %>
</div>
The Component
import React from "react";
import PropTypes from "prop-types";
export default class Test extends React.Component{
render(){
return (
<div>
test
</div>
)
}
}
The React API should render 'test' to the (v)dom.