stephengrider / rn-casts Goto Github PK
View Code? Open in Web Editor NEWCompanion Repo for a React Native course on Udemy
Home Page: https://www.udemy.com/the-complete-react-native-and-redux-course
Companion Repo for a React Native course on Udemy
Home Page: https://www.udemy.com/the-complete-react-native-and-redux-course
the one he gave in udemy is not updated
here is the eror
to the actual version of core-js@3.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for react@~r.9.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
PS F:\web downloads\original\rn-starter> npm install react@~r.9.0.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for react@~r.9.0..
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
I might be completely wrong or this error would be caused something from my end but I feel for some reason TrackContext file is not able to send functions through Context and Provider ?
I have attached TrackContext as well as createDataContext file.
TrackContext.js
`import createDataContext from "./createDataContext";
import trackerApi from "../api/trackerApi";
const trackReducer = (state, action) => {
switch (action.type) {
case "fetch_tracks":
return action.payload;
default:
return state;
}
};
const fetchTracks = (dispatch) => async () => {
const response = await trackerApi.get("/tracks");
dispatch({ type: "fetch_tracks", payload: response.data });
};
const createTrack = (dispatch) => async (name, locations) => {
console.log(name, locations);
await trackerApi.post("/tracks", { name, locations });
};
export const { Context, Provider } = createDataContext(
trackReducer,
{ fetchTracks, createTrack },
[]
);
`
createDataCOntext.js
`import React, { useReducer } from "react";
export default function createDataContext(reducer, actions, defaultValue) {
const context = React.createContext();
const Provider = ({ children }) => {
const [state, dispatch] = useReducer(reducer, defaultValue);
const boundActions = {};
for (let key in actions) {
boundActions[key] = actionskey;
}
return (
<context.Provider value={{ state, ...boundActions }}>
{children}
</context.Provider>
);
};
return { Context: context, Provider: Provider };
}
`
there are other sections e.g. sign in and sign out with firebase, code for the tech stack, code for firebase auth, redux, etc. i have errors while following the course but cannot find the files to download from this repository to compare why i have errors. thanks!
I left a comment on the course, but this might be more prudent.
A simple expo upgrade
got me back on track, however, I'm just getting started. Not sure if any code will be broken later on.
When I do npm install in rn-starter folder so it shows me many errors
npm ERR! path E:\React Native\First Practice\node_modules.staging\react-native-3ae3ca51\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\testScrollViewExample_1-iOS10_tvOS.png
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'E:\React Native\First Practice\node_modules.staging\react-native-3ae3ca51\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\testScrollViewExample_1-iOS10_tvOS.png'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink 'E:\React Native\First Practice\node_modules.staging\react-native-3ae3ca51\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\testScrollViewExample_1-iOS10_tvOS.png'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink 'E:\React Native\First Practice\node_modules.staging\react-native-3ae3ca51\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\testScrollViewExample_1-iOS10_tvOS.png'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\React Native\First Practice\node_modules\.staging\react-native-3ae3ca51\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\testScrollViewExample_1-iOS10_tvOS.png'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, unlink 'E:\React Native\First Practice\node_modules\.staging\react-native-3ae3ca51\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\testScrollViewExample_1-iOS10_tvOS.png'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\React Native\First Practice\node_modules\.staging\react-native-3ae3ca51\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\testScrollViewExample_1-iOS10_tvOS.png'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Dell\AppData\Roaming\npm-cache_logs\2019-08-31T17_33_47_718Z-debug.log
In useLocation.js, requesting user permissions is incomplete. As per the docs here, this function always resolves with a PermissionResponse object, even if permission is not granted.
Our code needs to check the response object, and throw an error manually in order to enter the catch block as expected.
I got issue as below when comment out the _mockLocations.js, and fake with gps on android or running on real iPhone device!
My github repo for this project: https://github.com/GinnyMorning/track010
Can you check why I got this issue,
Thank you.
This is my app.js code:
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import HomeScreen from './src/screens/HomeScreen';
import ComponentsScreen from './src/screens/ComponentsScreen';
const navigator = createStackNavigator(
{
Home: HomeScreen,
Component: ComponentsScreen
},
{
initialRouteName: 'Components',
defaultNavigationOptions: {
title: "App"
}
}
);
export default createAppContainer(navigator);
This is my ComponentsScreen.js file:
import React from 'react';
import { Text, StyleSheet } from 'react-native';
const ComponentsScreen = () => {
return This is the Components Screen;
};
const styles = StyleSheet.create ({
textStyle: {
fontSize: 30
}
});
export default ComponentsScreen;
import React from 'react';
import { Text, StyleSheet } from 'react-native';
const ComponentsScreen = () => {
return This is the Components Screen;
};
const styles = StyleSheet.create ({
textStyle: {
fontSize: 30
}
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.