React Native Tutorial for Beginners - Crash Course 2020
Why Stack Overflow recommends it
Stack Overflow users link it because beginners follow it step by step and then ask questions about the exact point where their setup or code diverges from the tutorial.
Recommended by 2 people across 2 different months, 2019 to 2021.
What it is
A nearly six-hour beginner crash course from Academind that walks through building an iOS and Android app with React Native and Expo. It starts with installing tooling and builds a course-goals list app covering state, lists, components and styling.
What people said
Recommends Mike · 2019-12 · Stack Overflow · on “React Native Delete Function not working as intended”
The intended function is that it would just delete the one goal that is clicked but for some odd reason it decides onPress to delete all goals listed. I am following this tutorial [this video] and im stuck around 2:44:45. If anyone else has done this tutorial and or can see my problem an explanation would be greatly appreciated. :) Program import React, { useState } from "react"; import { StyleSheet, Text, View, Button, TextInput, ScrollView, FlatList } from "react-native"; import GoalItem from "./components/GoalItem"; import GoalInput from "./components/GoalInput"; export default function App() { const [courseGoals, setCourseGoals] = useState([]); const addGoalHandler = goalTitle => { setCourseG
Recommends Hasan Toraman · 2021-02 · Stack Overflow · on “how to fix type never problem in react-native”
I am new to react native and was following this tutorial: enter link description here [this video] right now we were making a array of goals which is scrollable I followed exactly what he did on the video, but I am getting the following error: Argument of type '(currentGoals: never[]) => { key: string; value: string; }[]' is not assignable to parameter of type 'SetStateAction<never[]>'. Type '(currentGoals: never[]) => { key: string; value: string; }[]' is not assignable to type '(prevState: never[]) => never[]'. Type '{ key: string; value: string; }[]' is not assignable to type 'never[]'. Type '{ key: string; value: string; }' is not assignable to type 'never'.ts(2345) for the function: addGoal(
Cites mr.siddiquie · 2019-11 · Stack Overflow · on “Unable to install React native using expo-cli command on windows”
I am new to react-native. I have followed [this video] tutorial to install react-native but while installing it is showing error as shown below: Error: npm ERR! This is an error with npm itself. Please report this error at: npm ERR! [LINK] npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Saud.Siddqui\AppData\Roaming\npm-cache_logs\2019-11-11T08_41_45_520Z-debug.log Please help me to install react native using expo-CLI command. Thanks in advance! Saud
Cites ShLuBsTeR · 2019-12 · Stack Overflow · on “Error when trying to run react native app after fresh install”
So I've been following this tutorial: [this video] to try and learn react native for app development and I've been plagued with issues. After using expo to create a project using expo-template-blank by running: expo init first And then creating this very simple app like I was taught in the tutorial: import React, {useState} from 'react'; import { StyleSheet, Text, View, Button } from 'react-native'; export default function App() { const[outputText, setOutputText] = useState('New State'); return ( <View style={styles.container}> <Text>{outputText}</Text> <Button title="Change Text" onPress={() => setOutputText('the text changed')}/> </View> ); } const styles = StyleSheet.create({ container: { flex
Cites ShLuBsTeR · 2019-12 · Stack Overflow · on “Install expo cli errors at the end of install”
So I'm following this tutorial to try and learn React Native: [this video] And in the tutorial he shows to install expo cli using the line 'npm install expo-cli --global' But when i run that line, i get a whole bunch of warnings saying for example: npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues. In the tutorial he says to ignore this but at the end of the install i get this error: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! envsub@3.1.0 postinstall: `test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true` npm ERR! Exit status 1
Cites SuperHanz98 · 2020-03 · Stack Overflow · on “How can I remove the element that is clicked, instead of all items being deleted except the item clicked?”
This is from a react native tutorial -> [this video] The app is for putting down what your 'course goals' are. It's basically just a ToDo list. You can add goals and remove them. To try and get my head around it I thought I'd try and do the 'delete' code myself. I want to know how I can make my method work: export default function App() { const [courseGoals, setCourseGoals] = useState([]); function addGoalHandler(goalTitle) { setCourseGoals([goalTitle, ...courseGoals]); } function removeGoalHandler(index) { console.log(index) setCourseGoals(courseGoals.splice(index, 1)); } return ( <View style={styles.screen}> <GoalInput onAddGoal={addGoalHandler}/> <ScrollView> {courseGoals.map((goal, index) =>