Package 

Class StateWrapperImpl

  • All Implemented Interfaces:
    com.facebook.react.uimanager.StateWrapper

    
    public class StateWrapperImpl
     implements StateWrapper
                        

    This class holds reference to the C++ EventEmitter object. Instances of this class are created on the Bindings.cpp, where the pointer to the C++ event emitter is set.

    • Method Summary

      Modifier and Type Method Description
      ReadableMapBuffer getStateDataMapBuffer() Get a ReadableMapBuffer object from the C++ layer, which is a K/V map of short keys to values.
      ReadableNativeMap getStateData() Get a ReadableNativeMap object from the C++ layer, which is a K/V map of string keys to values.
      native void updateStateImpl(@NonNull() NativeMap map)
      void updateState(@NonNull() WritableMap map) Pass a map of values back to the C++ layer.
      void destroyState() Mark state as unused and clean up in Java and in native.
      • Methods inherited from class com.facebook.react.uimanager.StateWrapper

        updateState
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • updateState

         void updateState(@NonNull() WritableMap map)

        Pass a map of values back to the C++ layer. The operation is performed synchronously and cannotfail.

      • destroyState

         void destroyState()

        Mark state as unused and clean up in Java and in native. This should be called as early aspossible when you know a StateWrapper will no longer be used. If there's ANY chance of it beingused legitimately, don't destroy it! It is expected that all StateWrappers are destroyedimmediately upon stopSurface.