DEV Community

Discussion on: Building and Consuming a JSON API with Rails and React

Collapse
 
mikenath223 profile image
Michgolden Ukeje

Hi, Really love your post. But please when you wrote this:

This script will load the pack posts.jsx. We have to create that pack in the app/javascript/packs folder:

Where do i fix this code below:

import React from "react";
import ReactDOM from "react-dom";
import App from "components/App";

document.addEventListener("DOMContentLoaded", () => {
ReactDOM.render(
,
document.body.appendChild(document.createElement("div"))
);
});