Fork me on GitHub
#re-frame
<
2019-02-26
>
sofra00:02:59

@anish.developer what is the full name of the namespace you defined the ::initialized-db in?

anish00:02:23

It's defined in my-re-frame.events

sofra00:02:02

Great, have you required that namespace with an alias?

sofra00:02:13

either at the REPL (require '[my-re-frame.events :as events]) or in the my-re-frame.core namespace definition (:require [my-re-frame.events :as events])

sofra00:02:48

then at the REPL you should be able to type simply ::events/initialize-db without error. This should tell you if you got the key alias part right without worrying about re-frame.

anish00:02:26

thanks @U093DA4QY i have required events in core.cljs from where I'm dispatching event

sofra00:02:12

do you get an error when evaling ::events/initialize-db in the REPL?

anish00:02:27

(ns my-re-frame.core (:require [my-re-frame.events :as events]))

anish00:02:39

now when i switch (in-ns 'my-re-frame.core) in figwheel repl and do (re-frame/dispatch-sync [::events/initialize-db])

anish00:02:28

events is undefined so, I think my understanding about in-ns is wrong

sofra00:02:17

hmmm… it all looks right to me

sofra00:02:15

maybe in your setup you need to load the namespace? have you tried (load-namespace 'my-re-frame.core)?

anish00:02:28

Interesting now i get error Unable to resolve symbol: load-namespace in this context

anish00:02:32

I think it has something to do with emacs and cider setup

anish00:02:00

because i have started figwheel from emacs cider

anish00:02:46

thank you very much @U093DA4QY!

lilactown00:02:21

I'm not sure in-ns actually loads the file

lilactown00:02:32

load-namespace doesn't exist in CLJS either

lilactown00:02:54

you can try (require 'my-re-frame.core) and then (in-ns 'my-re-frame.core)

anish01:02:57

Thanks @U4YGF4NGM, still it can't load that namespace getting error Invalid token: ::events/initialize-db

anish01:02:02

ahh stupid of me, now i have found why I am getting those errors in emacs in fighweel starts in clj cider

anish01:02:24

and it tries to find files with clj extensions

dangercoder20:02:41

Trying to get Material UI - app-bar to work with a menu but it seems like the elements are all over my toolbar.. anyone who has managed to get this working? Currently using: https://github.com/madvas/cljs-react-material-ui

dangercoder20:02:21

The answer to the question is: Use icon-menu. 🙂

dangercoder21:02:14

they removed IconMenu in a never version of material ui, so if one looks at the examples of AppBar it might be confusing. If using old-material-ui.