Major Pain Points to Migrate to the New Architecture #68
Replies: 14 comments 84 replies
-
Pain : Hard to see what should be updated for libraries for every release. Idea 💡 ? Create |
Beta Was this translation helpful? Give feedback.
-
Pain : Since library users aren't always on latest, it's hard to know when to start migrating to new API, or the minimum version for each API in order to announce with breaking release the versions dropped Example : Let's use |
Beta Was this translation helpful? Give feedback.
-
Pain: hard to know which libraries support the new architecture programmatically. How to solve: maybe we could somehow enforce a field in the package.json that declares support? That way that info could be parsed by things like reactnative.directory and dep-check |
Beta Was this translation helpful? Give feedback.
-
Pain: there's no public/official benchmarks to prove that the new architecture leads to improvements. It might sound silly but without this type of "marketing" it's harder to sell to teams and their managers why they should undergo the transition to the new architecture. |
Beta Was this translation helpful? Give feedback.
-
When a library uses c++ state there are lots of manual build changes required in userland on Android. The library is opting out of part of the codegen and providing custom This is a common scenario because it affects any library that calls |
Beta Was this translation helpful? Give feedback.
-
Pain: There is no official guide, how to get view measurements before commit phase on the native side. Description: In my library, I would like to update native parent view (HostView), when react native child dimensions changed. I would like to do it synchronous manner instead of using How to solve it:
|
Beta Was this translation helpful? Give feedback.
-
I think better documentation with typescript codegen can be helpful. I faced an issue for the below use case that mixed types are not supported with codegen yet. RN's ImageSource is a mixed type but it works with codegen. So I am not sure whether I am doing something wrong. Below doesn't worktype Source = { uri: string }
export interface NativeProps extends ViewProps {
source?: number | Source
} This worksimport type { ImageSource } from 'react-native/Libraries/Image/ImageSource'
export interface NativeProps extends ViewProps {
source?: ImageSource
} P.S. The mixed type error also happens when using flow |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
iOS folly setupIt will become a burden on maintainers to keep the folly/cpp version and flags in sync with core. Seems that it will be tricky to support multiple react-native versions simultaneously. As a lib maintainer these seems more like app/core dependencies that I don't want to have to care about, and rather just depend on a versionless |
Beta Was this translation helpful? Give feedback.
-
Code gen and backwards supportUsing code-gen and keeping old-arch support is annoying – can't use complex types like typed objects and haven't found a way to extend the ManagerSpec on Android. Most non-trivial projects I've seen simply commit the generated code and core cheat by always generating code regardless of arch. |
Beta Was this translation helpful? Give feedback.
-
Noticed that optional type doesn't work well with codegen. Is it supported? e.g. Consider this turbomodule spec If a call is made |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Since @cortinico mentioned it and I had completely forgotten it: Build times ⏱In Another concern with such build times is that people can easily burn through their monthly allotted Actions minutes, which we only get 2000 of on the free tier: With the build times being what it is, I can't set up CI to build/test all the new arch stuff. It would be great if we could get pre-built binaries in some form for iOS. |
Beta Was this translation helpful? Give feedback.
-
Pain: Is there any other alternative? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone! We want to start a discussion to collect feedback from Core Contributors and Partners about major pain points on migrating to the new architecture.
These pain points can be of any nature:
The goal is to highlight what are the most relevant issues so that we can work on them together.
To Add a Pain Point
Simply post a message in the discussion, describing the problem and why it makes it hard to migrate to the new architecture. Try to be as specific as possible.
Each pain point will be then added to the Poll Options so other people can vote it and we also have a recap of all the pain points.Poll does not offer multiple choices, so you could only vouch for one issue, which is not optimal.
I replaced the poll with the list below, which links to the reported issue.
Please, upvote the issues you care the most! This will give us a signal of how impactful the issue is.
setNativeProps
is being deprecated, and the docs say that we should move all to state. This has a performance impact5 votes ·
Beta Was this translation helpful? Give feedback.
All reactions