All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gwt.mobx.client.MobXReact Maven / Gradle / Ivy

package gwt.mobx.client;

import gwt.react.client.components.ReactClass;
import gwt.react.client.components.StatelessComponent;
import gwt.react.client.proptypes.BaseContext;
import gwt.react.client.proptypes.BaseProps;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;

/**
 * MobX React integration
 */
@JsType(isNative=true, namespace= JsPackage.GLOBAL)
public class MobXReact {
    /**
     * The observer function can be used to turn ReactJS 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.
     *
     * 

Tip: when observer needs to be combined with other higher-order-components, make sure * that observer is the innermost (first applied) function; otherwise it might do nothing * at all.

* * @param reactClass The react class to make an observer * @param

The prop types * @return A wrapped ReactClass */ public static native

ReactClass

observer(ReactClass

reactClass); /** * 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. * *

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.

* * @param statelessComponent The stateless component to make an observer * @param

The prop type * @param The context type * @return A wrapped StatelessComponent */ public static native

StatelessComponent observer(StatelessComponent statelessComponent); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy