-
Implement a
Foo
component which simply renders<div>foo</div>
, and aBar
component which simply renders<div>bar</div>
(using render functions, obviously). -
Implement an
<example>
component which renders theFoo
component or theBar
component based on itsok
prop. For ifok
is true, the final rendered dom should be<div>foo</div>
. -
Implement a button in the root component that toggles
<example>
betweenFoo
andBar
by controlling itsok
prop.