尝试使用 clojurescript 中的 antd 我正在寻找一种惯用的方式来解构 js 对象。所以假设我们想做例如
import { Layout } from 'antd';
const { Header, Footer, Sider, Content } = Layout;
我怎样才能从 clojurescript 做到这一点而不必写冗长的
(let [Sider (.-Sider antd/Layout)
Header (.-Header antd/Layout)
Content (.-Content antd/Layout)
Footer (.-Footer antd/Layout)]
;; and here goes the hiccup using Sider etc.
)
提前致谢
弗里克