rvm
)
/-/basic-api/homepage.json
and /-/custom/menulist.json
. To retrieve this data, we've put a React component inside our Ruby app. This streamlines the process significantly, since now we can simply use the same code as that from our Remote React App Guide.GET
request to these endpoints. This can be seen in app/assets/javascripts/components/_home.js.jsx
and app/assets/javascripts/components/_menu.js.jsx
.componentDidMount
, we're able to fetch our JSON and render it accordingly. After we load it in, it's just a matter of parsing a JS Object.