0
Component creating with function, returns error
import { React } from "react";
import { Text } from "react-native";
const Product = () => <Text>Product</Text>;
export default Product;
But when it’s created with class it works normally
import React, { Component } from 'react';
import { Text } from "react-native";
export default class Product extends Component{
render(){
return(
<Text>Deu certo</Text>
);
}
}
Excellent observation.
– Marconi