Is there a proper documentation on how to use Expo SecureStore?
I’m new to react-native and I am building a login function to save a user id globally to be accessible throughout the app.



I have a homemade Stor component in which I incorporate SecureStore:

import Expo from 'expo' 

const Stor = async (key: string, value?: Object) => {

  let json = ''

  if ('object' == typeof value) {
    Expo.SecureStore.setItemAsync(key, JSON.stringify(value))
  else {
    json = await Expo.SecureStore.getItemAsync(key)
    return json


export default Stor


import Stor from './Stor'


let obj = {
  something: 'hey there'

Stor('some_key', obj) // Stores the object as a string.

let my_var = Stor('some_key') // Gets the stringified value out of storage.


cool thanks!

closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.