Last active
November 16, 2020 13:21
-
-
Save alancasagrande/308cd2ceb049d9e238d07c1d98dbbf1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { login } from './api'; | |
import App from './App'; | |
(async () => { | |
// try to login with cookie | |
const res = await login(); | |
// init app | |
const domContainer = document.createElement('div'); | |
document.body.appendChild(domContainer); | |
ReactDOM.render(<App user={res.user} />, domContainer); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment