August 2019
Intermediate to advanced
158 pages
3h 13m
English
For the sake of simplicity, I am adding a React component. This React component is going to simulate a real life scenario of the component that is responsible for including the <header-image> web component. Let this React component be MainBody; its definition would look something like this:
import React, { Component } from 'react';export default class MainBody extends Component { render() { return ( <div> <p>This is the main body</p> </div> ); }}
As you can see, it shows just one line of text and nothing else. If you have a more complex component, the steps will be the same. As for the starter app, we will include this MainBody component in our App component first, which is shown here:
import React from 'react';
Read now
Unlock full access