what difference between 2 following syntaxes , matter ?
const home = (props)=>{ return ( <div>balbal {props.test}</div> ) } **module.exports= home;** const home = (props)=>{ return ( <div>balbal {props.test}</div> ) } **export default home**
the first 1 'old' export syntax used requirejs share objects , functions. second more recent es6 modules syntax built-in javascript.
functionally, identical, second may considered more idiomatic now, supported.
Comments
Post a Comment