intergation of flask for ML into a meteor.js app
I use the useEffect
method to get the data from the requests of my api.
example:
const [data, setData] = useState(null);useEffect(() => { getData('GET', '/api/test') .then(response => { setData(response) }) .catch(error => console.log(error) );}, []);
Where getData
is a custom function that calls an axios request.