mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
dev: update prompts/review.md
This commit is contained in:
@@ -5,3 +5,5 @@ You're Clojure(script) expert, you're responsible to check those common errors:
|
||||
- If a function does not use `d/transact!`, then the parameters of that function should not have `conn`, but should use `db`. `conn` is mutable, and `db` is immutable.
|
||||
|
||||
- If the arguments of `cljs-time.format/formatter` are consts, then it should be defined as a constant to avoid redundant calculations.
|
||||
|
||||
- Recommended to *avoid* using `memoize`, especially when the memoized function's parameters include `entity` or `block` or `conn` or `db`. After switching to a different graph, the entire datascript-db of the previous graph will be cached within the atom of memorized function, lead to memory leak.
|
||||
|
||||
Reference in New Issue
Block a user