-
Notifications
You must be signed in to change notification settings - Fork 126
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
How to use daiquiri.core/html ? #257
Comments
In the rum version "0.12.10". |
Lines 9 to 13 in 72c9535
|
Can this function only be required by the backend and then used? |
I don’t know. @roman01la do you know this on the top of your head? |
I am quoting in the wrong way, because this is a macro, so I have to use require-macro😂, I searched the github code, and found that there is no project using daiquiri.core, I thought this thing can not be used, so I asked you. (:require-macros
[daiquiri.core :refer [html]]) |
Another problem is that if I use rum and datascript as the front end, if I need to update the datascript data, I will update the rum component responsively: |
Yes, I was thinking about fine-grained reactivity for DataScript, but nothing was implemented. Maybe one day :) |
For partial update components, there are actually some solutions, which I have tried. A specific datascript data can be updated to achieve partial real-time update. Like this project: (defn posh! [dcfg & conns]
(let [posh-atom (atom {})]
(reset! posh-atom
(loop [n 0
conns conns
posh-tree (-> (p/empty-tree dcfg [:results])
(assoc :ratoms {}
:reactions {}))]
(if (empty? conns)
posh-tree
(recur (inc n)
(rest conns)
(let [db-id (keyword (str "conn" n))]
(p/add-db posh-tree
db-id
(set-conn-listener! dcfg posh-atom (first conns) db-id)
(:schema @(first conns)))))))))) It uses a large posh-atom (reagent) and posh-tree as a proxy, puts datascript data into their memory, and then listens to the modified data of datascript through d/listen!, and modifies it through posh-tree posh-atom, so as to realize the partial effect of responsive update. |
But I think the implementation of the posh project is okay with fewer nodes. If there are too many nodes, there will be performance problems. Because all datascript data will be placed in reagent posh-atom, resulting in too much memory usage. This is a very rough way. Although it can look more elegant to use. @tonsky what do you think? ;-P |
Can not find this function :
@tonsky
The text was updated successfully, but these errors were encountered: