Skip to content

DhanjeetKumarThakur/React-Movie-Listing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Learning Project

  • We going to note down here the things which are either important or new to us. So next time when we want to revise topics will just go through this file to get over-view.
  • Let's start with this simple example
export function About() {
    return (
        <>
            <h1> About Us</h1>
        </>
    )
}

function Home() {
    return (
        <>
            <h1> Welcome To React World </h1>
        </>
    )
}

export default Home

Here there are two components Home and About

import Home, { About } from './components/Home'

function App() {
    return(
        <>
            <Home />
            <About />
        </>     
    )
}

Note:

  • The difference in the import statements
import Home, { About } from './components/Home'

It is because of the way we use export key, while exporting the About we have not used the default keyword so while importing the component we used {} this is called *Named Export eg {About} whereas Home is called Default export

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors