問題タブ [re-frame]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
electron - Clojurescript: Web アプリ バージョンをデスクトップ Electron バージョンと共存させる方法
leiningen ベースの clojurescript webapp を作成しました。
より具体的には、リフレーム テンプレートを使用しています: https://github.com/Day8/re-frame-template。
このプロジェクトを電子ベースのデスクトップ アプリにコンパイルすることは可能でしょうか? https://github.com/Gonzih/cljs-electronのような electron テンプレートがあることに気付きましたが、web バージョンと electron バージョンを共存させる方法がわかりません。
これは可能ですか?
アップデート:
私の質問をより明確にするために:
電子ベースのバージョンと Web ベースのバージョンで同じコード ベースを共有するにはどうすればよいですか? そうする例はありますか?
clojurescript - ClojureScript Re-frame subscription dereferencing dilemma
What's the best of following approaches?
Outer subscription, early deref
Outer subscription, late deref
Inner subscription, early deref
Inner subscription, late deref
When I keep the inner component pure using outer subscription, I can end up with many arguments that need to be passed through deeply nested structure of often unrelated parents. That can easily become a mess.
When I subscribe inside inner component, it becomes impure, losing easy testability.
Also, I wonder if there is an important difference between early and late dereferencing, other than I have to pass reagent/atom when testing the latter.