Browse Source

dev: update prompts/review.md

rcmerci 6 months ago
parent
commit
c2564469a2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      prompts/review.md

+ 2 - 1
prompts/review.md

@@ -6,8 +6,9 @@ You're Clojure(script) expert, you're responsible to check those common errors:
 
 - 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.
+- Recommended to *avoid* using `memoize` to define global vars, 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.
 
 - Avoid using `dorun` to execute side effects; `doseq` is recommended.
 
 - `util/web-platform?` is a not a function.
+