What is a mistake i made in this code?

Hi Kirupa! What is a mistake i made in this code? Where is my mistake? I think, I did all correct, but I can’t see result. I want to do cards as cards in online-shops

class Btn extends React.Component {

            render(){

                var btnObject = {

                    padding:10,

                    boxSizing:'border-box',

                    backgroundColor: '#006400',

                    borderRadius:10,

                    border:'none',

                    color:'white'

                }

                return (

                    <button style = {btnObject}>Click me</button>

                )

            }

        }

        class Card extends React.Component {

            render(){

                var cardObject = {

                    backgroundColor:'white',

                    height:200,

                    width:150,

                    borderRadius:10,

                }

                return(

                    <div style = {cardObject}>

                        <topCard/>

                    </div>

                )

            }

        }

        class topCard extends React.Component{

            render(){

                var CardTop = {

                    height:150,

                    backgroundColor:'#DC143C'

                }

                return(

                    <div style = {CardTop}></div>

                )

            }

        }

        ReactDOM.render(

            <div class = 'dflex'>

                <Card/>

                <Card/>

                <Card/>

                <Card/>

            </div>,

            document.querySelector('#container')

        )

What is the error you see in the console?

You should capitalize topCard.

topCard -> TopCard
1 Like

Thanks very much, your advice helped me!!!

I should capitalize topCard, I found my mistake, thanks for feedback