Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Datascript (through Posh?) #151

Closed
mtruyens opened this issue Feb 5, 2016 · 3 comments
Closed

Integrate Datascript (through Posh?) #151

mtruyens opened this issue Feb 5, 2016 · 3 comments

Comments

@mtruyens
Copy link

mtruyens commented Feb 5, 2016

This would be awesome!

See https://github.com/mpdairy/posh

@kristianmandrup
Copy link

@mtruyens We are working on it ;) You are welcome to contribute!

https://gitter.im/metasoarous/posh

@mike-thompson-day8
Copy link
Contributor

I'll be interested to see what people do. But I'm going to close this issue for the moment.

@Conaws
Copy link

Conaws commented Jun 13, 2016

I've been using Re-Frame and Posh together quite a bit, but I think doing it much less effectively than I could. So far I've been passing around a datascript connection to subscriptions and handlers the same way I would if it was any other value

(register-sub
 :e
 (fn [_ [_ conn eid]]
   (pull conn '[*] eid)))


(register-sub
 :text
 (fn [db]
   (reaction (:text @db))))

(register-sub
 :datoms
 (fn [_ [_ conn]]
   (q conn '[:find ?e ?attr ?val
             :where
             [?e ?attr ?val]])))

(register-sub
 :db-entities
 (fn [_ [_ conn]]
  (q conn '[:find ?e
             :where
             [?e]])))


(register-sub
 :tree
 (fn [db]
   (reaction (:tree @db))))

posh returns a reaction, so as you can see it's basically equivalent.

The thing I just saw over at

#170

About the second argument most re-framers don't know about, seems to suggest I could be doing this much better.

Any suggestions on where I could look for inspiration?

@day8 day8 locked and limited conversation to collaborators Mar 29, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants