:link-flows
当sub 已更改、@(subscribe [:link-flows ::assign-to-flow-q])
未触发且重新渲染未运行时,我有此代码块。
我觉得是re-frame/as-element
fn?
由于 React 子表错误,包裹到(fn [])
也会引发错误,因此它不是一个选项。
Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
(let [flows @(subscribe [:link-flows ::assign-to-flow-q])]
(re-frame/as-element
[ant/select
{:showSearch true
:optionFilterProp "children"
:onSearch #(dispatch [:set-ns-search-q ::assign-to-flow-q %])}
(map (fn [flow]
[ant/select-option
{:value (:id flow)} (:name flow)])
flows)]))
有什么方法可以使这种重新渲染机制起作用吗?