Skip to content

Commit

Permalink
fix: Use NitroDefines import
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jan 21, 2025
1 parent 8a78beb commit 9e45c77
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int initialize(JavaVM* vm) {
margelo::nitro::image::JHybridBaseSpec::registerNatives();
margelo::nitro::image::JHybridChildSpec::registerNatives();
margelo::nitro::image::JHybridTestViewSpec::registerNatives();
#if REACT_NATIVE_VERSION >= 78
#if REACT_NATIVE_VERSION_MINOR >= 78
margelo::nitro::image::views::JHybridTestViewStateUpdater::registerNatives();
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
/// Copyright © 2025 Marc Rousavy @ Margelo
///

#if REACT_NATIVE_VERSION >= 78

#include "JHybridTestViewStateUpdater.hpp"
#include <NitroModules/NitroDefines.hpp>
#if REACT_NATIVE_VERSION_MINOR >= 78

#include "views/HybridTestViewComponent.hpp"

namespace margelo::nitro::image::views {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

#pragma once

#if REACT_NATIVE_VERSION >= 78
#include <NitroModules/NitroDefines.hpp>
#if REACT_NATIVE_VERSION_MINOR >= 78

#include <fbjni/fbjni.h>
#include <react/fabric/StateWrapperImpl.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
/// Copyright © 2025 Marc Rousavy @ Margelo
///

#if REACT_NATIVE_VERSION >= 78

#import "HybridTestViewComponent.hpp"
#include <NitroModules/NitroDefines.hpp>
#if REACT_NATIVE_VERSION_MINOR >= 78

#import <memory>
#import <react/renderer/componentregistry/ComponentDescriptorProvider.h>
#import <React/RCTViewComponentView.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
/// Copyright © 2025 Marc Rousavy @ Margelo
///

#if REACT_NATIVE_VERSION >= 78

#include "HybridTestViewComponent.hpp"
#include <NitroModules/NitroDefines.hpp>
#if REACT_NATIVE_VERSION_MINOR >= 78

#include <string>
#include <exception>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

#pragma once

#if REACT_NATIVE_VERSION >= 78
#include <NitroModules/NitroDefines.hpp>
#if REACT_NATIVE_VERSION_MINOR >= 78

#include <optional>
#include <NitroModules/NitroDefines.hpp>
#include <NitroModules/NitroHash.hpp>
#include <NitroModules/CachedProp.hpp>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
Expand Down Expand Up @@ -98,5 +98,5 @@ namespace margelo::nitro::image::views {
} // namespace margelo::nitro::image::views

#else
#warning "View Component 'HybridTestView' will be unavailable in React Native, because it requires React Native 78 or higher."
#warning "View Component 'HybridTestView' will be unavailable in React Native, because it requires React Native 78 or higher."
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "HybridObject.hpp"
#include <memory>
#include <string>
#include <cxxreact/ReactNativeVersion.h>

namespace margelo::nitro {

Expand Down

0 comments on commit 9e45c77

Please sign in to comment.