Last active
October 22, 2019 11:38
-
-
Save Davisonpro/a77506e154b61f93d80ed84e47ccf97a to your computer and use it in GitHub Desktop.
App.js file
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, { Component, Fragment } from 'react'; | |
import { render } from 'react-dom'; | |
import { asyncComponent } from 'react-async-component'; | |
/** We are importing our index.php my app Vairaible */ | |
import myApp from 'myApp'; | |
class Myapp extends Component { | |
render() { | |
const { user : { name, email }, logged } = myApp; | |
return ( | |
<Fragment> | |
<div className="dashboard"> | |
{logged && | |
<h2 className="status">Logged In</h2> | |
} | |
<h1 className="name"> {name}</h1> | |
<p className="email">{email}</p> | |
<p>API host variable {__API_HOST__}</p> | |
</div> | |
</Fragment> | |
) | |
} | |
} | |
render(<Myapp/>, document.getElementById('app')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment