lundi 7 juin 2021

React Props Is Creating A Empty Div

So This is the code I am learning from a tutorial and it works but it creates a empty div container I think this is because when I created the props from react I think the h1 and p elements were empty so I think thats why this makes a empty div. Does any one know how to slove this

import React from 'react'

function Note(props) {
    return (
        <div className="note">

            <h1>{props.title}</h1>
            <p>{props.content}</p>
            

        </div>
        
        )
}

export default Note



Aucun commentaire:

Enregistrer un commentaire