-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore: Enable Fabric #6478
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
base: develop
Are you sure you want to change the base?
chore: Enable Fabric #6478
Conversation
This reverts commit f90e17b.
…upgrade @testing-library/react-native to 13.2.0, and update jest-expo to 52.0.6. Refactor useEndpointData tests to use render from @testing-library/react-native.
ba18393
to
2c78fa0
Compare
Apparently class components and function components behave differently in Fabric. Created this repro: The idea is to replace RoomsListView with it and inspect logs. import { Component, useEffect } from 'react';
import { View, Button, Text } from 'react-native';
const Dummy = ({ navigation }) => (
<View>
<Text>RoomsListView</Text>
<Button onPress={() => navigation.jumpTo('ProfileStackNavigator')} title='Go to profile' />
</View>
);
function RoomsListView({ navigation }) {
useEffect(() => {
console.log('RoomsListView mounted');
return () => {
console.log('RoomsListView unmounted');
};
}, []);
return <Dummy navigation={navigation} />;
}
// class RoomsListView extends Component {
// componentWillUnmount(): void {
// console.log('RoomsListView unmounted');
// }
// render() {
// const { navigation } = this.props;
// return <Dummy navigation={navigation} />;
// }
// }
export default RoomsListView; I think it's time to migrate everything to function components before migrating to Fabric 👀 |
You are just stuck in a update loop 🤣🤣
Do react native team still focus on the class components?? When I started my journey I found some articles to use the functional component instead of class 🤔 |
Well, it's part of the job 😅
We started the app before React Hooks even existed. |
Proposed changes
Now Fabric is enabled, pay attention to batch updates https://react.dev/learn/queueing-a-series-of-state-updates
Issue(s)
Depends on #6380
Depends on RocketChat/react-native-simple-crypto#8
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments