diff --git a/ch08/hi-order/js/load-website.js b/ch08/hi-order/js/load-website.js index 1b2287f..867bd8d 100644 --- a/ch08/hi-order/js/load-website.js +++ b/ch08/hi-order/js/load-website.js @@ -11,7 +11,7 @@ const LoadWebsite = Component => { return 'https://facebook.github.io/react/docs/top-level-api.html'; } handleClick(event) { - document.getElementById('frame').src = getUrl(); + document.getElementById('frame').src = this.getUrl(); } componentDidMount() { console.log(ReactDOM.findDOMNode(this)); diff --git a/ch08/hi-order/jsx/load-website.jsx b/ch08/hi-order/jsx/load-website.jsx index 0168be6..e64c92f 100644 --- a/ch08/hi-order/jsx/load-website.jsx +++ b/ch08/hi-order/jsx/load-website.jsx @@ -8,7 +8,7 @@ const LoadWebsite = (Component) => { return 'https://facebook.github.io/react/docs/top-level-api.html' } handleClick(event) { - document.getElementById('frame').src = getUrl() + document.getElementById('frame').src = this.getUrl() } componentDidMount() { console.log(ReactDOM.findDOMNode(this))