Fork me on GitHub

I'm writing a simple app with Krell. What would you recommend to use to create/access sqlite databases? (mostly interested in working with android at the moment) I tried using react-native-sqlite-storage, but for some strange reason, both (require '[sqlite-react-native-storage :as sqlite]) and (js/require "react-native-sqlite-storage) return nil . I'm new to the ecosystem so I have no clear clue what's going on. It seems I was importing the library the wrong way - in ES6 the right way to import it is import SQLite from 'react-native-sqlite-storage' so I tried with (require '[react-native-sqlite-storage :refer [SQLite]]) but this seems the wrong way to do it. But this question is probably more fit in #beginners I verified both require('react-native-sqlite-storage') and importing it the es6 way are working by requiring/importing in the krell_repl.js file.


Maybe try to import it in the REPL via js/require, see what is being returned and take it from there? Alliteratively look at this wrapper for hints


Thanks! I'll try ^^


re. importing it from the cljs repl, I tried both js/require and plain require (both should work from the krell repl). Both of them return nil - really no clues why. requiring it from js, I get an object that prints out as {} if I console.log it, but I can still call methods on it.


@U3SG7RX7A the above code would fail at the assert for me - no clues what's wrong tbh


Not in front of a computer right now…


It seems it was due to some transpilation leftovers, it worked after a cleanup, but not on the repl - it seems I can't dynamically require stuff in react-native

Michael Jung18:05:20

Hi all, I’m trying to get started with cljs and RN using Krell. I was following the instructions at without getting any issues. However, I don’t see any of the cljs stuff on my Android phone. I only see the default “Welcome to React Native” screen. The REPL is not being connected to either. Looks like I need to do some additional change so the compiled cljs code gets picked up (it is there at target/main.js). Any ideas what I’m doing wrong?