rsnext/test/integration/basepath/components/welcome.js
Tim Neutkens 86808bbce2
Add basePath support (#9872)
* Add basePath support

* Add tests including copy of HMR tests

* Add production tests

* Add tests for serverless target

* Add missing quotes
2019-12-29 20:03:12 +01:00

17 lines
310 B
JavaScript

import React from 'react'
export default class Welcome extends React.Component {
state = { name: null }
componentDidMount() {
const { name } = this.props
this.setState({ name })
}
render() {
const { name } = this.state
if (!name) return null
return <p>Welcome, {name}</p>
}
}