Skip to content

Use of undeclared identifier 'ShadowNodeWrapper'; did you mean 'shadowNodeWrapper'? #3023

@neeteshraj

Description

@neeteshraj

Description

I have installed 2.18.0 version of react-native-gesture-handler and i am getting this issue while building the ios app in new architecture enabled.

Use of undeclared identifier 'ShadowNodeWrapper'; did you mean 'shadowNodeWrapper'?
Replace 'ShadowNodeWrapper' with 'shadowNodeWrapper'
Variable 'shadowNodeWrapper' declared with deduced type 'auto' cannot appear in its own initializer

the error is pointing here.

#ifdef RCT_NEW_ARCH_ENABLED
void decorateRuntime(jsi::Runtime &runtime)
{
auto isFormsStackingContext = jsi::Function::createFromHostFunction(
runtime,
jsi::PropNameID::forAscii(runtime, "isFormsStackingContext"),
1,
[](jsi::Runtime &runtime, const jsi::Value &thisValue, const jsi::Value *arguments, size_t count) -> jsi::Value {
if (!arguments[0].isObject()) {
return jsi::Value::null();
}

    auto shadowNodeWrapper = arguments[0].asObject(runtime).getNativeState<ShadowNodeWrapper>(runtime);
    bool isFormsStackingContext =
        shadowNodeWrapper->shadowNode->getTraits().check(ShadowNodeTraits::FormsStackingContext);
    return jsi::Value(isFormsStackingContext);
  });

runtime.global().setProperty(runtime, "isFormsStackingContext", std::move(isFormsStackingContext));
}
#endif // RCT_NEW_ARCH_ENABLED.
Screenshot 2024-07-31 at 11 36 55 AM
`

Steps to reproduce

  1. Create a new project
  2. Install 2.18.0 version of react-native-gesture handler

Snack or a link to a repository

private repo

Gesture Handler version

2.18.0

React Native version

0.74.4

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPhone 15 Pro simulator

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions