loading...

re: Building and Consuming a JSON API with Rails and React VIEW POST

FULL DISCUSSION
 

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"))
);
});

Code of Conduct Report abuse