This file contains 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
// Returns a memoized player instance that updates when the source changes | |
function useVideoPlayer(source): VideoPlayer { | |
return useMemo(() => new VideoPlayer(source), [source]); | |
} | |
class VideoPlayer extends EventEmitter { | |
volume: number; | |
// Hook that updates when its `this` (the player) changes the volume | |
useVolume(): number { |
This file contains 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 SwiftUI | |
final class RSUIShadow: RSUIView { | |
func render(props: RSUIProps) -> some View { | |
let radius = props.cgFloat("radius", 0.0) | |
let offsetX = props.cgFloat("offsetX", 0.0) | |
let offsetY = props.cgFloat("offsetY", 0.0) | |
let color = props.color("color", Color.black) | |
let opacity = props.double("opacity", 0.33) |
This file contains 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
package com.myapp; | |
import android.app.Application; | |
import com.facebook.react.ReactApplication; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.shell.MainReactPackage; | |
import com.facebook.soloader.SoLoader; | |
import com.myapp.generated.BasePackageList; |
This file contains 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 { TaskManager } from 'expo'; | |
import { EventEmitter } from 'fbemitter'; | |
const taskName = 'task-name-of-your-choice'; | |
const taskEventName = 'task-update'; | |
const eventEmitter = new EventEmitter(); | |
TaskManager.defineTask(taskName, ({ data, error }) => { | |
if (!error) { |
This file contains 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 { TaskManager } from 'expo'; | |
const taskName = 'task-name-of-your-choice'; | |
TaskManager.defineTask(taskName, ({ data, error }) => { | |
// the contents of the `data` parameter depends on the task type | |
console.log(`Task ${taskName} has been called with params:`, data, error); | |
}); |
This file contains 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
source 'https://github.com/CocoaPods/Specs.git' | |
platform :ios, '9.0' | |
target 'YOUR_PROJECT_NAME' do | |
pod 'ExpoKit', | |
:git => "http://github.com/expo/expo.git", | |
:tag => "ios/2.8.2", | |
:subspecs => [ | |
"Core" | |
], |