nosco / hx

A simple, easy to use library for React development in ClojureScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Functional components can't be specced

lilactown opened this issue · comments

Because functional components are expected to take in a JavaScript object as props, and return a React Element, it is not currently possible to write a spec for them.

c5fccda adds support for pre- and post-conditions in the defnc macro.

I think that this adequately satisfies most uses of speccing React components.

One enhancement might be to enable/disable pre/post checks based on goog.DEBUG.