Deepak yadav
Deepak yadav

Reputation: 1

Not able to use new component in App component in reactjs

I am trying to use resturant component in App component. I imported resturant in App but not able to use it.screenshots

##Here is App component main##

import React from 'react'
import resturant from './components/basics/resturant'


const App = () => {
  return (
    <>
      <h1>This is App</h1>
      <resturant />
    </>
  )
}


export default App

##Here is resturant component.##

import React from 'react'

const resturant = () => {
  return (
    <>
    <div>
        <h1>
            Yo I am resturant
        </h1>
    </div>
   
    </>
  )
}

export default resturant

not able to use resturant data in app component. In portal only App components data is showing.

Upvotes: 0

Views: 32

Answers (0)

Related Questions