I have created a native UI component for React Native on Android side. I know how to add properties to the view. But how should I send data from my view to javascript side?
public class MyView extends FrameLayout {
    public MyView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }
    public void setColor(int color) {
        // Set the color of my view
    }
    public String getData() {
        return "some data";
    }
}
And this is the view manager:
public class MyViewManager extends ViewGroupManager<MyView> {
    public static final String REACT_CLASS = "MyView";
    ReactApplicationContext mCallerContext;
    public MyViewManager(ReactApplicationContext reactContext) {
        mCallerContext = reactContext;
    }
    @Override
    public String getName() {
        return REACT_CLASS;
    }
    @Override
    protected MyView createViewInstance(ThemedReactContext reactContext) {
        return new MyView(reactContext, null);
    }
    @ReactProp(name = "color")
    public void setColor(MyView view, int color) {
        view.setColor(color);
    }
    // What should I add here for the "getData" method.
    // I can not use @ReactMethod here as it is only used in modules.
}