Listing 3-4: User-defined elements can have any attributes
- Widget Size: huge
- Number Of Columns: 3
- Title: Welcome to My Widget
import MyFancyWidget from './MyFancyWidget';
function MyFancyComponent(props){
return(
<MyFancyWidget
widgetSize="huge"
numberOfColumns="3"
title="Welcome to My Widget" />
)
}
export default MyFancyComponent;
Download the examples, report issues, and ask/answer questions in the discussion area by visiting the book's github page. All of the code for the book is also available on codesandbox.io for you to play around with.
ReactJS Foundations is published by John Wiley and Sons, Inc and is available in paperback and eBook.