UnimplementedViewProps.h 863 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #pragma once
  8. #include <react/components/view/ViewProps.h>
  9. namespace facebook {
  10. namespace react {
  11. /*
  12. * It's a normal `ViewProps` with additional information about the component
  13. * name which is being updated manually in `ComponentDescriptor`.
  14. */
  15. class UnimplementedViewProps final : public ViewProps {
  16. public:
  17. using ViewProps::ViewProps;
  18. /*
  19. * Should be called from a `ComponentDescriptor` to store information about
  20. * the name of a particular component.
  21. */
  22. void setComponentName(ComponentName componentName);
  23. ComponentName getComponentName() const;
  24. private:
  25. mutable ComponentName componentName_{};
  26. };
  27. } // namespace react
  28. } // namespace facebook