Skip to content

fix(template): remove the view manager template for iOS #864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ArturKalach
Copy link

Summary

Currently, with React Native versions 0.79.x to 0.80.x, the definition of Fabric View components has been changed. You can find that there is no ViewManager in the React Native documentation: https://reactnative.dev/docs/next/fabric-native-components-introduction

Additionaly, RCTViewManager could lead to the problem with registration:
image

  • It could be that the componentProvider inside codegenConfig fix the problem

I tested it with different versions of React Native and found that ViewManager is only needed for the old architecture and React Native versions below 0.74.x.


@ArturKalach ArturKalach changed the title fix: remove the view manager template for iOS fix(template): remove the view manager template for iOS Jun 17, 2025
Copy link
Member

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating this PR, looks good! This is indeed not needed for the new architecture, but I'm curious why the error popped up, did you access some old architecture APIs in the new one?

@ArturKalach
Copy link
Author

ArturKalach commented Jun 18, 2025

Hello @okwasniewski,

Let me share some context first:
I have been using create-react-native-library for a couple of years, and I usually set up a new package to check for any changes. In my repositories, I maintained backward compatibility because I started with that approach. However, some errors have started appearing with React Native versions 0.79.x to 0.80.x.

This week, I discovered that using ViewManager and registering components through it led to some issues. However, after removing ViewManager, everything started working fine. Additionally, adding the componentProvider for iOS inside codegenConfig resolved my issues with the component layout. It seems likely that these issues were related to the ViewManager registration. I believe that registering components via componentProvider is the key to resolving these problems.

However, for various reasons, I decided to raise this PR to visualize the change for others.

I had this issue:
ArturKalach/react-native-a11y-order#13 (comment)
But can't really reproduce the component registration problem.

Also have layout problems:
ArturKalach/react-native-a11y-order#15
But, componentProvider solve the problem.


BTW: Thank you for such a useful package! I’ve learned a lot from it and believe this has been the best way to create libraries for React Native over the past 3–4 years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants