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

Why am I getting error ts(1005) ',' expected

$
0
0

I'm following a tutorial to learn how to create APIs with React Native and I'm getting ts(1005) error. Can someone please help me? I've tried other solutions, but still, no success, and the comment section of the tutorial is disabled :(

typescript: 4.5.4

Print and the code follows:Image,Android Studio View

import React, {useState, useEffect} from 'react';import {Text, View } from 'react-native';import {css} from './assets/css/Css';import Page from './views/Page';export default function App() {  const [product, setProduct]=useState(initialState:'teste');  useEffect(effect:()=>{    setProduct(value:'New')  });  return (<View style={css.container}><Text>{product}</Text><Page {...props}/></View>  );}

Viewing all articles
Browse latest Browse all 6287

Trending Articles



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