Fork me on GitHub
#fulcro
<
2019-01-08
>
jzhu512105:01:37

mutation/integrate-ident* doesn't work? in source code it has a {:pre [(map? state)]}, but we passed in this function is a atom, how does it work?

jzhu512105:01:14

actually it always failed with error: Assert failed: (map? state)

jzhu512105:01:52

how can I use the integrate-ident* function ?

Björn Ebbinghaus07:01:25

Use it with swap!

(defmutation foo [params]
  (action [{:keys [state]}]
    (swap! state integrate-ident* [:your-comp/by-id 42] :append [:bar/list 15 :comp-list])))  

jzhu512102:01:39

I see, thanks. I was consider using this way, but looks total different from original integrate-ident! function.

daniel.spaniel16:01:21

i am curious how to use the fulcro incubator library

daniel.spaniel16:01:42

i put [fulcrologic/fulcro-incubator "0.0.24"] in the project.clj file in the dependencies section

daniel.spaniel16:01:19

restarted the shadow-cljs and that did not work. is there another special sause thing i should do ?

tony.kay17:01:52

should work, unless you’re using deps.edn

daniel.spaniel17:01:52

ok .. i keep trying .. am not using deps.edn

daniel.spaniel17:01:18

interesting .. the error says

daniel.spaniel17:01:19

failed to require macro-ns "fulcro.incubator.pessimistic-mutations", it was required by "fulcro.incubator.pessimistic-mutations"

daniel.spaniel17:01:49

so it looks like the incubator is there ( jar file ) but require for pessimistic-mutaions is not working

daniel.spaniel17:01:09

in a file i required like this

daniel.spaniel17:01:10

[fulcro.incubator.io-progress :as ip]

daniel.spaniel17:01:24

and the compiler barfed with error i showed above

daniel.spaniel17:01:07

if i try to require [fulcro.incubator.pessimistic-mutations :as pm]

daniel.spaniel17:01:16

No namespace: fulcro.incubator.pessimistic-mutations found

daniel.spaniel18:01:51

after i add the require for the incubator in the project.clj file do i have to run lein install ( i tried it and it did not work ) anything else i should try ?

wilkerlucio18:01:59

@dansudol can you try lein repl and run (require 'fulcro.incubator.pessismistic-mutations) and see what happens?

daniel.spaniel18:01:41

that is good idea btw

daniel.spaniel18:01:28

FileNotFoundException Could not locate fulcro/incubator/pessismistic_mutations__init.class or fulcro/incubator/pessismistic_mutations.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name

daniel.spaniel18:01:13

interestingly when i look at the external libraries in intellij ( using cursive ) i see tons of files ( naturally ) and there is a listing with "Leiningen: fulcrologic/fulcro:2.6.9" but i don't see the fulcro-incubator ( which is obvious ) because it is not there .. but how do i get it there is question

wilkerlucio18:01:45

did you refresh the lein project? I was asking specifically to try on terminal because that will garantee the things are loaded

wilkerlucio18:01:00

in Cursive you need to refresh lein projects when deps are changed, otherwise the classpath is not updated

wilkerlucio18:01:36

I can confirm this version works because I have deployed apps using it, so its probably some small detail

daniel.spaniel18:01:22

how do i refresh lein project ( i did try lein install )

daniel.spaniel18:01:52

and i got you about cursive

daniel.spaniel18:01:18

restart of intellij now shows the incubator jar

wilkerlucio18:01:27

use the lein bar to refresh the project

daniel.spaniel18:01:29

which means lein repl should have that jar

wilkerlucio18:01:49

you can try deleting it from ~/.m2/repositories and reinstall

wilkerlucio18:01:01

its rare, but I've seen downloads get corrupted

pserrano18:01:19

Does anyone works with react-native + fulcro?

tony.kay18:01:23

we do have a few users doing native…not sure if they’re around right now

mdhaney17:01:21

I volunteered last week to amend the docs with a chapter on native apps. I’m so sorry I haven’t got to this yet. Current project is due end of the month and is really tight, so it will be a few more weeks before I realistically will have time. Just wanted to let you know I haven’t bailed on the offer, just delayed.

👍 5
j1mr10rd4n02:01:35

i’m also working with native at the moment, should have some bandwidth to collaborate on some docs if you like

pserrano19:01:25

I've never heard about expo. Help me get this straight: with this I'll run this app directly in my phone? No need for android studio?

pserrano19:01:15

Wow, thats interesting.

wilkerlucio20:01:33

its super cool, you install their expo app on your phone and use it to scan a QR code generated on the terminal, and thats it, up running 🙂

pserrano20:01:27

I'm receiving this error as I try to start your app with yarn start

$ react-native-scripts start
/bin/sh: 1: react-native-scripts: not found
error Command failed with exit code 127.
info Visit  for documentation about this command.

pserrano20:01:14

(I've never ran a react-native app nor anything with expo in this computer) Any ideas?

pserrano20:01:44

Ok, I solved this.

pserrano15:01:16

Still couldn't see this working. expo+reactnative problems

pserrano16:01:16

Finally made it work! Read your own fix from 18/02/2018 about the target folder error with shadow-cljs Plus updating expo to version 26, since 25 is no longer supported

🎉 5
wilkerlucio18:01:49

cool, if you can send the fixes to make it run I'll be happy to take PR so when the next person uses this is a ref its in good shape 😉

pserrano19:01:05

Sure, gonna pull it later today.

mdhaney17:01:21

I volunteered last week to amend the docs with a chapter on native apps. I’m so sorry I haven’t got to this yet. Current project is due end of the month and is really tight, so it will be a few more weeks before I realistically will have time. Just wanted to let you know I haven’t bailed on the offer, just delayed.

👍 5