Can't find Variable : "View"
add view to the import like this:
import {StyleSheet,View} from "react-native" ;
ReferenceError: Can't Find Variable
Try adding Button
to the import like so:
import {
Platform,
StyleSheet,
Text,
View,
Button
} from 'react-native';
React Native ReferenceError Can't find variable
As Derek mentioned,
you have never defined
MyAppHeader
, therefore you will get error.
You could delete all <MyAppHeader></MyAppHeader>
in your project, and it should work!
Otherwise you will need to defined MyAppHeader Component to make it works.
Clearly post for React Components Components and Props - React
Hope it will help.
Can't find variable: React
In the latest version of React Native you must import React from 'react' package
import React, {Component} from 'react';
import {
View,
...
} from 'react-native';
Related Topics
How to Disable and Enable a Click Event on a Table Td
Why Is the Onclick Event Triggered Twice
Jquery Class on Click Works on Desktop But Not Mobile
Webcam Js Error in Chrome: Could Not Access Webcam
Textarea With Initial Auto Height by Content With Pure CSS
Filter Input Text to Enter Only Number and Not Even Decimal
How to Prevent iOS Keyboard from Pushing the View Off Screen With CSS or Js
Detecting When User Scrolls to Bottom of Div With React Js
How to Replace All Words of Length Less Than 3 in a String With " " (Space) in JavaScript
Django Template JavaScript Passing a Python Variable to a JavaScript One
How to Synchronize the Scroll Position of Two Divs
How to Make Autoplay of the Swiper Slider Start Only After the Slider Enters Viewport
How to Highlight Parts of an Imagemap on Mouseover
Possible to Detect If a User Has Multiple Tabs of Your Site Open
How to Close Bootstrap 3 Dropdown When We Click Outside on a Tablet