本文整理匯總了Java中gwt.react.client.components.StatelessComponent類的典型用法代碼示例。如果您正苦於以下問題:Java StatelessComponent類的具體用法?Java StatelessComponent怎麽用?Java StatelessComponent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StatelessComponent類屬於gwt.react.client.components包,在下文中一共展示了StatelessComponent類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: observer
import gwt.react.client.components.StatelessComponent; //導入依賴的package包/類
/**
* The observer function can be used to turn ReactJS stateless components into reactive
* components. It wraps the component's render function in mobx.autorun to make sure
* that any data that is used during the rendering of a component forces a re-rendering
* upon change.
*
* <p>Tip: when observer needs to be combined with other higher-order-functions, make sure
* that observer is the innermost (first applied) function; otherwise it might do nothing
* at all.</p>
*
* @param statelessComponent The stateless component to make an observer
* @param <P> The prop type
* @param <C> The context type
* @return A wrapped StatelessComponent
*/
public static native <P extends BaseProps, C extends BaseContext> StatelessComponent<P> observer(StatelessComponent<P> statelessComponent);