Skip to content

Instantly share code, notes, and snippets.

View anhdevit's full-sized avatar
💭
Happy

Anh Dev anhdevit

💭
Happy
View GitHub Profile
@jonathanpalma
jonathanpalma / KeychainStorage.js
Last active July 11, 2023 10:28
How to persis redux store using redux-persist and react-native-keychain
import AsyncStorage from '@react-native-community/async-storage';
import {
setGenericPassword,
getGenericPassword,
resetGenericPassword,
} from 'react-native-keychain';
const KeychainStorage = {
async getAllKeys(cb) {
try {
@patrickkempff
patrickkempff / KeychainStorage.js
Created June 18, 2018 16:32
redux-persist react-native-keychain
import { AsyncStorage } from 'react-native'
import { setGenericPassword, getGenericPassword, resetGenericPassword } from 'react-native-keychain'
export default {
async getAllKeys (callback) {
try {
const keys = await AsyncStorage.getAllKeys()
if (callback) {
callback(null, keys)
}
@jsdf
jsdf / ReactNativeHTML.js
Last active July 11, 2024 00:06
Rendering HTML rich text as React Native <Text> elements
var React = require('react-native')
var {
View,
Text,
LinkingIOS,
StyleSheet,
} = React
// you might want to compile these two as standalone umd bundles
// using `browserify --standalone` and `derequire`