Reactium + REST
The foundational web app framework Reactium can be used with our Actinium API or with and client-side API of your choosing.
Creating a simple API
import Reactium from 'reactium-core/sdk';
import axios from 'axios';
const helloAPI = {
hello() {
return axios.get('http://demo7132150.mockable.io/hello');
}
};
// TODO: register API hereRegister your API
import Reactium from 'reactium-core/sdk';
import axios from 'axios';
const helloAPI = {
contructor(baseURL) {
this.axios = axios.create({
baseURL,
});
}
hello() {
return this.axios.get('/hello');
}
};
Reactium.API.register({
name: 'helloAPI',
api: new helloAPI('http://demo7132150.mockable.io'),
});Use your API
Last updated