Answer the question
In order to leave comments, you need to log in
Exporting and importing React components, which is better?
Greetings to all who responded!
Help the green developer figure it out)
here is the code
// Foo.jsx
export const Foo = ()=>{
// ...code
}
// Bar.jsx
const Bar = ()=>{
// ...code
}
export default Bar
import {Foo} from './Foo'
import Bar from '.Bar'
Answer the question
In order to leave comments, you need to log in
You need to download the Google skill:
Difference between export {name}, export default {name}?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question