how do I get beicon
to work?
i have a problem with The required namespace "beicon.impl.rxjs-operators" is not available
I have added rxjs
to package.json
problem solved, in node-repl
it doesn't work, in browser-repl
there is no problem
still something doesn't work ;(
The required JS dependency "rxjs/Rx" is not available, it was required by "beicon/impl/rxjs.cljs"
from what I see and read, the library is set up to work with figwheel
, not shadow-cljs
why does ptk/add-watch
not call the function added with add-watch
to ptk/store
?
hi @huxley, we are using beicon at https://github.com/penpot/penpot and it works correctly with shadow-cljs, but it needs some tweaks in order to correctly work
Yes, I know, I found 😉
https://github.com/penpot/penpot/tree/develop/frontend/vendor/beicon/impl
oh nice,
I have already added the files from the vendor
directory
oh yeah, that's files
about potok, unfortunatelly the documentation is outdated; as I don't expected that the library is heavy used outside from my own projects 😛
because is not very popular way to handle state, and the the people used to have some fear to RX
regarding ptk/add-watch
, I have already found that (rx/delay)
messes everything up
I'm tired of re-frame
& reagent
and looking for something new
hehe nice, probably penpot is a good source for knowing how potok+beicon works; the badside is that the project is pretty big that does not help
i'll try to have some time this week for update potok documentation
I'm maintaining >5 years old ecommerce that uses rum
fork rum and datascript
fork. Compared to it penpot
is lovely, simple, organized and super readable 😉
Anyway, don't worry about the documentation, it's all in the code, which is well described.
oh, thanks! 😊
btw, you are probably the best example of a person suffering from a lisp course 😉 you produce an incredible amount of libraries and you always use your own solutions
and that's great, because less able people like me have it easier
xD
hehehe, i'm just curious and try to find a simple solutions for my own problems and challenges; and spend a good amount of time on research on how to improve the currently established solutions
the potok, rumext and okulary is probably a portion of result of this; potok right now is probably 5 years old and it has aged pretty well; we as a team developing penpot did't found real obstacles with the current architecture of state management of the application... I didn't have the same experience with redux, flow and other similar aproaches form the JS world
potok only suffers from the learning curve, because it requires knowing rx pretty well for more advanced stuff
I'm just trying to figure out how to display the rx/stream data using rum
I haven't seen rx/to-atom
used anywhere in the penpot
, and that's the only thing I can think of
@huxley this is something related to documentation 😞 ; look at this line https://github.com/penpot/penpot/blob/develop/frontend/src/app/main/store.cljs#L26
the state is already an atom
so you can use it from rum as-is
the idea behind this, is that all changes are async, but state should be accessed using synchronous primitives
I got what you're talking about, it's easy
but I've got another idea I can't make happen
I know I can use l/derived too, but that's not what I have in mind yet.
I'll try to explain in my limited English
You definitely know datascript
and maybe you know posh
yeah, I know it but never used it
The posh
listens for changes in the db, and checks if these changes match the query
I wanted to make a stream
where I have the difference between old-db
and new-db
I've already got it
I also have functions that listen for these differences and based on them return something
and I'd like to use this "something" with rum
probably the easiest way to it is materialize the result of a stream into an atom
atom is a good synchronous primitive for storing the result of a curret result of some process
Great!
if you have a stream of "something" (results)
just use to-atom
for materialize it to an atom
you also have the option to use BehaviorSubject of RX
is analogous to atom
but need some adaptations in order to make it work with rum
I tried to do a deref a subject
but it looks like the data needs to be pulled out somehow differently
For rumext, we have this hook (react hook)
is analogous to rum and rumext deref
awesome
for subjects
this is it!
I think I have all the pieces of the puzzle to replace the current stack
thank you, you helped me a lot
np