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, { useEffect, useRef } from 'react' | |
import { View } from 'react-native' | |
import { useQuery, useQueryClient } from '@tanstack/react-query' | |
import { useIsFocused } from '@react-navigation/native' | |
export const MyScreen = () => { | |
const isFocused = useIsFocused(); | |
const queryClient = useQueryClient(); | |
const controllerRef = useRef<AbortController | null>(null); |
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, { useEffect, useRef, useState } from 'react' | |
import { View } from 'react-native' | |
import { useMutation } from '@tanstack/react-query' | |
export const MyScreen = () => { | |
const [data, setData] = useState<number[]>([]) | |
const controllerRef = useRef<AbortController | null>(null); | |
const getListMutation = useMutation({ | |
mutationFn: async () => { |
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 { DataTypes, literal, Model, Optional } from 'sequelize'; | |
import { v4 as uuidv4 } from 'uuid'; | |
import { sequelize } from './connection'; | |
import { UserDetail } from './UserDetail'; | |
interface Attributes { | |
uuid: string; | |
name: string; | |
position: string; |
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 { DataTypes, literal, Model, Optional } from 'sequelize'; | |
import { v4 as uuidv4 } from 'uuid'; | |
import { sequelize } from './connection'; | |
import { UserDetail } from './UserDetail'; | |
interface Attributes { | |
uuid: string; | |
name: string; | |
position: string; |
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 { DataTypes, literal, Model, Optional } from 'sequelize'; | |
import { v4 as uuidv4 } from 'uuid'; | |
import { sequelize } from './connection'; | |
import { UserDetail } from './UserDetail'; | |
interface Attributes { | |
uuid: string; | |
name: string; | |
position: string; |
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, { useState } from 'react' | |
import { StyleSheet, TouchableOpacity, View, Text, Alert } from 'react-native' | |
import RNFS from 'react-native-fs' | |
const perc2color = (perc: number) => { | |
var r, g, b = 0 | |
if (perc < 50) { | |
r = 255 | |
g = Math.round(5.1 * perc) | |
} |
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
const perc2color = (perc: number) => { | |
var r, g, b = 0; | |
if (perc < 50) { | |
r = 255; | |
g = Math.round(5.1 * perc); | |
} | |
else { | |
g = 255; | |
r = Math.round(510 - 5.10 * perc); | |
} |
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 {useState} from 'react'; | |
const App = () => { | |
const initialState = [ | |
{id: 1, country: 'Austria'}, | |
{id: 2, country: 'Belgium'}, | |
{id: 3, country: 'Canada'}, | |
]; | |
const [data, setData] = useState(initialState); |
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
... | |
expo > ios > infoPlist | |
"NSFaceIDUsageDescription": "This app use face id authentication." | |
... |
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 { PropTypes } from "prop-types"; | |
import React, { Component } from "react"; | |
import { | |
Animated, | |
Dimensions, | |
Keyboard, | |
StyleSheet, | |
TextInput, | |
UIManager, | |
TouchableWithoutFeedback |
NewerOlder