React幻想在React中渲染fantasyland结构。选项Option是值的容器,封装空检查条件。允许用Option.None替换null并只写逻辑而不进行任何检查。用法var React = require ( 'react' ) , Option = require ( 'fantasy-options' ) . Option , option = require ( 'react-fantasy' ) . option ; var SomeValue = React . createClass ( { getDefaultProps : function ( ) { return { value : Option . None ; } } , renderVal