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
import * as React from 'react' | |
import { PropertyControls, ControlType } from 'framer' | |
// Define type of property | |
export interface Props { | |
text: string, | |
color: string, | |
boolean: boolean, | |
numberA: number, | |
numberB: number, |
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
import { Data, animate, Override, Animatable } from "framer"; | |
// Set an array to keep each scaleValues | |
const data = Data({ scaleValues: [] }); | |
export const Scale: Override = props => { | |
// Add to the array the id and the animation value | |
data.scaleValues.push({ id: props.id, scaleValue: Animatable(1) }); | |
return { | |
// Pass the current id to the function |
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
export const ScaledAwait: Override = () => { | |
return { | |
scale: data.scale, | |
onTap: async () => { | |
await animate.spring(data.scale, 0.5).finished | |
await animate.spring(data.scale, 1.5).finished | |
await animate.spring(data.scale, 0.5).finished | |
console.log('finished!') | |
}, | |
} |
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
import React from 'react' | |
import styled from 'styled-components' | |
const Tab = ({ onClick, isSelected, children }) => { | |
const TabWrapper = styled.li` | |
width: 48px; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
padding: 20px; |
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
sdk.dir = /Users/diegooriani/Library/Android/sdk |
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
react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug | |
cd android | |
./gradlew assembleDebug | |
adb install -r ./app/build/outputs/apk/app-debug.apk |
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
git remote set-url origin NEWURL |
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
// Refresh by executing the fuction every 45 seconds | |
setInterval(() => this._fetchArrivalTimes(), 45000); |
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
class App extends React.Component { | |
render() { | |
return ( | |
<ul> | |
<Data /> | |
</ul> | |
) | |
} | |
} |
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
import React, { Component } from 'react'; //import 'React' default export, and { Component } non-default export from react | |
import fetch from 'isomorphic-fetch'; // isomorphic-fetch is used for both server side and client side 'fetch' (see https://github.com/matthew-andrews/isomorphic-fetch) | |
// App.css was a hangover from the create-react-app, it's not really needed for this basic example | |
const url = 'https://api.tfl.gov.uk/BikePoint'; // API | |
class App extends Component { // This is the same as 'extends 'React.Component' |