Creating a WidgetRenderer
Learn how to use Bootstrap styles to make a React component that renders the IWidget data type.
We'll cover the following
It’s time to render more than just the title and description properties of our IWidget type. Let’s make a new component, WidgetRenderer. Unlike the previous components we’ve seen, WidgetRenderer will accept the IWidget type directly as its property type. This way, we can use
Unstyled rendering of all widget
properties
First, let’s render all properties of our widgets, each within a <p>
tag.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy