TopNavigation's acessory prop problem in ui-kitten ^5

Author: ZzziiroCreated Dec 11, 2024Updated Dec 11, 2024

Bug Report

I'm trying to apply a ReactElement to my TopNavigation's accessoryLeft prop, but it wont accept it unless I make it a () => ReactElement though the node_modules says otherwise, even with this code error, it runs just fine. This wouldn't be a huge problem but, when using the arrow function, the component doesn't respect the TopNavigation's placement or the screen space, just like it was 'absolute'.

Here's the code:

image 1

Here's the error:

image

Here's the node_modules:

image

Here's the same component, using () => ReactElement

image 2

Expected behavior

It should work fine using the ReactElement, just as it does with () => ReactElement, respecting the screen space and TopNavigation's position.

UI Kitten and Eva version

Package Version
@eva-design/eva ^2.2.0
@ui-kitten/components 5.3.1

Environment information

System: OS: Linux 6.9 Pop!_OS 22.04 LTS CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz Binaries: Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm npmPackages: react: 18.3.1 => 18.3.1 react-native: 0.76.3 => 0.76.3

Source: akveo/react-native-ui-kitten