17 lines
285 B
JavaScript
17 lines
285 B
JavaScript
import React from 'react';
|
|
|
|
class SetTitle extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
if (typeof props.onSetTitle === 'function' && props.title) {
|
|
props.onSetTitle(props.title);
|
|
}
|
|
}
|
|
|
|
render() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
export default SetTitle;
|