This repository was archived by the owner on Nov 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Find a combination of packages that works reliably #78
Open
isocra
wants to merge
6
commits into
expo:master
Choose a base branch
from
isocra:feature/fix-package-versions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4c6074d
find a combination of packages that works reliably
2697df2
fixed examples/signature/package.json so it runs
ee067c9
Updated packages for SDK36
ed234ab
Add UNSAFE_ to componentWillMount
387c452
merge master
fa837f2
Started the process of updating the packages
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| node_modules/**/* | ||
| .expo/* | ||
| npm-debug.* | ||
| .idea/* | ||
| .history/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,6 @@ | |
| "version": "1.0.0", | ||
| "primaryColor": "#E44262", | ||
| "icon": "./assets/icon.png", | ||
| "platforms": ["web", "ios", "android"], | ||
| "loading": { | ||
| "icon": "./assets/icon.png", | ||
| "hideExponentText": false | ||
|
|
@@ -17,4 +16,4 @@ | |
| }, | ||
| "platforms": ["android", "ios", "web"] | ||
| } | ||
| } | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a newline at the end of the file. |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,72 +1,37 @@ | ||
| import Expo from 'expo'; | ||
| import * as ExpoPixi from 'expo-pixi'; | ||
| import React, { Component } from 'react'; | ||
| import { Image, Button, Platform, AppState, StyleSheet, Text, View } from 'react-native'; | ||
| import React from 'react'; | ||
| import { Button, StyleSheet, View } from 'react-native'; | ||
|
|
||
| const isAndroid = Platform.OS === 'android'; | ||
| function uuidv4() { | ||
| //https://stackoverflow.com/a/2117523/4047926 | ||
| return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | ||
| var r = (Math.random() * 16) | 0, | ||
| v = c == 'x' ? r : (r & 0x3) | 0x8; | ||
| return v.toString(16); | ||
| }); | ||
| } | ||
|
|
||
| export default class App extends Component { | ||
| state = { | ||
| image: null, | ||
| strokeColor: 0, | ||
| appState: AppState.currentState, | ||
| }; | ||
|
|
||
| handleAppStateChangeAsync = nextAppState => { | ||
| if (this.state.appState.match(/inactive|background/) && nextAppState === 'active') { | ||
| if (isAndroid && this.sketch) { | ||
| this.setState({ appState: nextAppState, id: uuidv4(), lines: this.sketch.lines }); | ||
| return; | ||
| } | ||
| } | ||
| this.setState({ appState: nextAppState }); | ||
| }; | ||
|
|
||
| componentDidMount() { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe removal of this will break switching apps in Android - the drawing will be cleared upon return to the app. |
||
| AppState.addEventListener('change', this.handleAppStateChangeAsync); | ||
| } | ||
|
|
||
| componentWillUnmount() { | ||
| AppState.removeEventListener('change', this.handleAppStateChangeAsync); | ||
| } | ||
| export default function App() { | ||
| let sketch = null; | ||
|
|
||
| onReady = () => { | ||
| console.log('ready!'); | ||
| }; | ||
|
|
||
| render() { | ||
| return ( | ||
| return ( | ||
| <View style={styles.container}> | ||
| <View style={styles.container}> | ||
| <View style={styles.container}> | ||
| <View style={styles.sketchContainer}> | ||
| <ExpoPixi.Signature | ||
| ref={ref => (this.sketch = ref)} | ||
| style={styles.sketch} | ||
| strokeColor={'blue'} | ||
| strokeAlpha={1} | ||
| onReady={this.onReady} | ||
| /> | ||
| </View> | ||
| <View style={styles.sketchContainer}> | ||
| <ExpoPixi.Signature | ||
| ref={ref => (sketch = ref)} | ||
| style={styles.sketch} | ||
| strokeColor={'blue'} | ||
| strokeAlpha={1} | ||
| onReady={onReady} | ||
| /> | ||
| </View> | ||
| <Button | ||
| color={'blue'} | ||
| title="undo" | ||
| style={styles.button} | ||
| onPress={() => { | ||
| this.sketch.undo(); | ||
| }} | ||
| /> | ||
| </View> | ||
| ); | ||
| } | ||
| <Button | ||
| color={'blue'} | ||
| title="undo" | ||
| style={styles.button} | ||
| onPress={() => { | ||
| sketch.undo(); | ||
| }} | ||
| /> | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| const styles = StyleSheet.create({ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your site-specific clutter should not be added to the repo-wide
.gitignore. Use your local git config, or the private.git/info/exclude.