switch to react refs

This commit is contained in:
MathuraMG 2016-09-01 12:51:38 -04:00
parent 6cba157687
commit 8de170135e

View file

@ -2,13 +2,14 @@ import React from 'react';
class TextOutput extends React.Component { class TextOutput extends React.Component {
componentDidMount() { componentDidMount() {
document.getElementById('canvas-sub').focus(); this.refs.canvasTextOutput.focus();
} }
render() { render() {
return ( return (
<section <section
className="text-output" className="text-output"
id="canvas-sub" id="canvas-sub"
ref="canvasTextOutput"
tabIndex="0" tabIndex="0"
aria-label="text-output" aria-label="text-output"
title="canvas text output" title="canvas text output"