📩
Fetching Data
Learn how to integrate our system with React Native.
You can easily use echo3D with your React Native project by using our RESTful API.
app.js
...
render: function() {
var echoDB;
// Query echo3D
fetch('https://api.echo3D.com/query?key=' + API_KEY)
.then((response) => response.json())
.then((json) => {
// Store database
global.echoDB = json; // Save JSON response as a global variable
})
.catch((error) => {
console.error(error);
});
...
}
...
var apiKey = global.echoDB.apiKey;
var db = Object.values(global.echoDB.db);
Last modified 1mo ago