Fork me on GitHub
#cljsrn
<
2019-06-06
>
Oliver George02:06:15

Can anyone recommend an approach to async storage. I want some durable storage so that users can work offline and post data to the server when the network is available.

codonovan10:06:32

We've ended up defaulting to firestore / datastore for this across several web and RN projects

Oliver George02:06:30

The asyncstorage documentation says "It is recommended that you use an abstraction on top of AsyncStorage instead of AsyncStorage directly for anything more than light usage since it operates globally."

Oliver George02:06:06

My default position is "a few helper functions seem to suffice - wait till I out grow them" but perhaps that's short sighted.

lepistane07:06:41

i have similar questions so will be following this. Are there any cljs rn examples online for offline app usage?

shidima15:06:05

I am trying to use components from 'react-native-elements' in my re-natal app. I have installed the package with yarn add and im tring to load a component with (def Header (js/require "react-native-elements/Header"))

shidima15:06:35

But I get an error 'Unknown Named Module'

shidima15:06:00

Do I need to restart something, or am I doing something wrong

lepistane15:06:09

let me check i think u should 2-3 more things

lepistane15:06:39

2. re-natal use-component react-native-elements 3. re-natal use-figwheel

lepistane15:06:03

then go through the rest of setup (start-figwheel ... ) and (def rne (js/require "react-native-elements")) and then (def header (r/adapt-react-class (.-Header rne))

shidima15:06:13

Let me see

shidima15:06:40

Tried the steps but am still getting Unknown named module "react-native-elements"

shidima15:06:35

I'm getting a different error in the react-native logs, its missing a module

lepistane15:06:00

if yarn did it's thing you should see what it added to package.json (or equivalent for yarn i am not that familiar with it 🙂)

shidima15:06:14

Its working now

shidima15:06:22

It was missing react-native-vector-icons

lepistane15:06:42

nice! 😄 great job

shidima15:06:02

I added it with yarn and restarted the react-native packager 🙂