Fabric component update props failed
See original GitHub issueDescription
I implemented a fabric component of iOS datepicker, and it can be displayed normally now, but when I update the component properties in js, I don’t see updateProps:oldProps: in C++ being called. I don’t know what went wrong. Someone encountered this kind of problem?
Version
0.69.2
Output of npx react-native info
System:
OS: macOS 12.3.1
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Memory: 220.73 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v14.17.0/bin/npm
Watchman: 2022.07.04.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/milker90/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 23, 25, 26, 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.0, 29.0.2, 29.0.3, 30.0.2, 30.0.3
System Images: android-31 | Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_291 - /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.2 => 0.69.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
react-native run-ios
Snack, code example, screenshot, or link to a repository
this is fabric component code: git repo
using component code, you can reproduce the problem by simply updating the mode from ‘date’ to ‘datetime’
<BTDatePicker
style={{ height: 40, width: 180 }}
date={date}
mode={mode}
onChange={onChange}
/>
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Cannot update a component while rendering a different ...
The problem is when one component queues an update in another component, while the first component is rendering. In other words, don't do...
Read more >Unknown Prop Warning - React
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >How to fix the "cannot update a component while rendering a ...
While working on a React / Next.js application I got this error: Cannot update a component (`App`) while rendering a different component.
Read more >How to solve too many re-renders error in ReactJS?
After mounting a React component, it will listen to any React props or state that has changed. It will, by default, re-render the...
Read more >React Text Field component - Material UI - MUI
The error prop toggles the error state. The helperText prop can then be used to provide feedback to the user about the error....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Milker90, thanks for raising the issue. As you correctly supposed
ViewManager
are something that Fabric Components will let you delete, eventually. To remove them completely, we need to rollout another piece of infrastructure that will come very soon.Yes. Unfortunately, we were not able to ship the piece of infra that allows us not to do it.
But it is close to be released!