Since `componentWillMount` will run both on the server and the client, `document` may not be available when it is running, resulting in a runtime error. Suggest moving the canvas creation to `componentDidMount` which only runs on the client