-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: drop backward compatible templates
As of React Native 0.76, the new architecture is now default. So this moves the templates with new architecture up. New libraries should start with new arch template. For legacy usage, we still have the legacy template for now. Old architecture libraries still work in new architecture via compat layer. So the backward compatible templates are unnecessary. They are also difficult to maintain and are currently broken, so I'm removing them.
- Loading branch information
Showing
36 changed files
with
129 additions
and
590 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
packages/create-react-native-library/templates/common-example/example/src/App.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
packages/create-react-native-library/templates/example-module-legacy/example/src/App.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { useState, useEffect } from 'react'; | ||
import { Text, View, StyleSheet } from 'react-native'; | ||
import { multiply } from '<%- project.slug -%>'; | ||
|
||
export default function App() { | ||
const [result, setResult] = useState<number | undefined>(); | ||
|
||
useEffect(() => { | ||
multiply(3, 7).then(setResult); | ||
}, []); | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<Text>Result: {result}</Text> | ||
</View> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}); |
Oops, something went wrong.