4.1: Challenge Answer

We wanted to throw this at you as a review of what we've covered. There is no new information in this challenge. Here's what you should have done:

import React from 'react';

const JSXRules = () => {
    return(
        <div className="main">
            <div className="mainDiv">
                <h1 className="section-title">JSX</h1> 
                <dl>
                    <dt>Resembles HTML</dt>
                    <dd>It's not. It's actually closer to JavaScript.</dd>
                    <dt>"React elements"</dt>
                    <dd>These are used to construct and update the DOM, or what you see on the screen.</dd>
                    <dt>JSX is not required</dt>
                    <dd>You can write your return in vanilla JS, but most sane people use JSX.</dd>
                </dl>
            </div>
        </div>
    );
}

export default JSXRules;

You'll need to import the component add the Link & Route to the Sidebar.js file:

Last updated