From cb21996186b9902c76419e87073328f531e40a23 Mon Sep 17 00:00:00 2001 From: JakubK44 Date: Mon, 19 Aug 2019 13:13:42 -0700 Subject: [PATCH] Step1/04 - React Intro - final demo - fix to show the customized buttons (#131) * Fix Step1/04 - React Intro - final Problem: 1. Customized Button.tsx is not used in Counter.tsx 2. index.tsx still renders the 'hello world' text Fix: 1. Use customized Button.tsx in Counter.tsx 2. Have index.tsx render the App component instead of 'hello world' text Notes: Validated customized button now show correctly. * Add missing blank line. --- step1-04/final/src/components/Counter.tsx | 3 ++- step1-04/final/src/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/step1-04/final/src/components/Counter.tsx b/step1-04/final/src/components/Counter.tsx index 132e022..aef3799 100644 --- a/step1-04/final/src/components/Counter.tsx +++ b/step1-04/final/src/components/Counter.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { Button } from './Button'; export class Counter extends React.Component { constructor(props) { @@ -13,7 +14,7 @@ export class Counter extends React.Component { return (
{text}: {clicks} - +
); } diff --git a/step1-04/final/src/index.tsx b/step1-04/final/src/index.tsx index 5c86c49..4035d74 100644 --- a/step1-04/final/src/index.tsx +++ b/step1-04/final/src/index.tsx @@ -1,4 +1,5 @@ import React from 'react'; import ReactDOM from 'react-dom'; +import { App } from './App'; -ReactDOM.render(

hello world

, document.getElementById('app')); +ReactDOM.render(, document.getElementById('app'));