Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Why react native props not works?

$
0
0

Could you help me with following problem:

props.title does not appear in {props.title}

console.log(props.title); //returns Mobile App, then several lines in console there is undefined?

console output

I'm using react native+typescript.

import React  from 'react';import ReactDOM from 'react-dom';const MobileApp = (props : any)  => {    console.log(props.title);    return (<div ><div>Test</div><div>{props.title}</div></div >    );}ReactDOM.render(<MobileApp title="Mobile App"/>,  document.getElementById('root'));export default MobileApp;

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>