I am trying to get the page to render in my browser from the following code below in the promise because I only want to render it when the promise is resolved.However it keeps erroring and says that there is no render function. How do I return the following tag.
app.auth().currentUser.getIdToken(true).then(function(idToken) {
accessToken = idToken;
console.log(accessToken);
config = {
headers: {'Authorization': accessToken}
};
axios.get('http://localhost:4001/api/v1/page', config)
.then(function (response) {
return (
<h1> test </h1>
);
})
.catch(function (error) {
console.log(error);
});
});