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 useRouterQueryState from '../hooks/useRouterQueryState' | |
| // const [myState, setMyState] = useRouterQueryState(propertyName, defaultValue) | |
| import { useState, useEffect } from 'react' | |
| import { useRouter } from 'next/router' | |
| function useRouterQueryState (key, defaultValue) { | |
| const router = useRouter() | |
| // Get initial state from router query or default value |
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, { useRef, useCallback, useEffect } from 'react' | |
| import { GestureResponderEvent, PixelRatio } from 'react-native' | |
| import { GLView } from 'expo-gl' | |
| import Expo2DContext, { Expo2dContextOptions } from 'expo-2d-context' | |
| const App = (): React.ReactElement => { | |
| const ctxRef = useRef<Expo2DContext | null>(null) | |
| const pixelRatio = PixelRatio.get() | |
| let originPos = [0, 0] |
OlderNewer