JavaScript for WordPress › Forums › Gutenberg Development › Get content from another site in the network, Rest API? › Reply To: Get content from another site in the network, Rest API?
January 31, 2019 at 3:20 pm
#87307
Zac Gordon
Keymaster
Okay, so first thing with an API call inside React is that the basic way is to add it to the componentDidMount method. Now you can’t do that in edit setting without creating your own custom component.
However here is an example of how to add a basic API call in React
https://github.com/zgordon/react-book/blob/master/9-component-lifecycle/completed/src/Practice2.js
Let me know if that helps get you there