Skip to content

Instantly share code, notes, and snippets.

@satomiichii
Last active February 19, 2021 05:01
Show Gist options
  • Save satomiichii/0c0d97ac5585c74e0278450489938502 to your computer and use it in GitHub Desktop.
Save satomiichii/0c0d97ac5585c74e0278450489938502 to your computer and use it in GitHub Desktop.
Home Component
import React from 'react'
import {connect} from 'react-redux'
import {handleSubscription} from '../../public/main'
export class UserHome extends React.Component {
//other code are omited
async componentDidMount() {
try {
await handleSubscription(this.props.user)
} catch(error) {
console.log('Error in componentDidMount, error')
}
render () {
//other code are omited
return ()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment