Skip to content

Instantly share code, notes, and snippets.

@kmikulski kmikulski/post.jsx
Created Jun 7, 2018

What would you like to do?
the description for this gist
import React, { Component } from 'react';
class UserInfo extends Component {
constructor(props) {
this.state = {
name: "",
email: "",
id: ""
this.props.keycloak.loadUserInfo().then(userInfo => {
this.setState({name:, email:, id: userInfo.sub})
render() {
return (
<div className="UserInfo">
<p>Name: {}</p>
<p>Email: {}</p>
<p>ID: {}</p>
export default UserInfo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.