當前位置: 首頁>>代碼示例>>Java>>正文


Java StatelessComponent類代碼示例

本文整理匯總了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);
 
開發者ID:GWTReact,項目名稱:gwt-mobx,代碼行數:17,代碼來源:MobXReact.java


注:本文中的gwt.react.client.components.StatelessComponent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。