This file contains hidden or 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
| import Main from './components/Main'; | |
| function App() { | |
| return ( | |
| <div className='App'> | |
| <Main /> | |
| </div> | |
| ); | |
| } |
This file contains hidden or 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
| import React, {memo, useState, useCallback, InputHTMLAttributes} from 'react'; | |
| import Profile from '../../../shared/src/components/Profile'; | |
| const Main: React.FC = () => { | |
| const [name, setName] = useState<string>(''); | |
| const [id, setId] = useState<string>(''); | |
| const onNameChanged = useCallback< | |
| NonNullable<InputHTMLAttributes<HTMLInputElement>['onChange']> | |
| >((event) => setName(event.target.value), []); |
This file contains hidden or 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
| import Profile, {ProfileProps} from '../shared/src/components/Profile'; | |
| const profileMock: ProfileProps = {name: 'John Doe', id: '123456'}; | |
| const App = () => ( | |
| <SafeAreaView> | |
| <Profile {...profileMock} /> | |
| </SafeAreaView> | |
| ); |
This file contains hidden or 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
| import React from 'react'; | |
| import {View, Text} from 'react-native'; | |
| export interface ProfileProps { | |
| name: string; | |
| id: string; | |
| } | |
| const Profile: React.FC<ProfileProps> = ({name, id}) => ( | |
| <View> |
This file contains hidden or 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
| # dependencies | |
| **/node_modules/ | |
| **/.pnp | |
| **/.pnp.js | |
| # env | |
| **/.env | |
| # production | |
| **/build/ |
This file contains hidden or 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
| const path = require('path'); | |
| const { | |
| override, | |
| babelInclude, | |
| addBabelPlugins, | |
| removeModuleScopePlugin, | |
| addWebpackModuleRule, | |
| } = require('customize-cra'); | |
| module.exports = override( |
This file contains hidden or 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
| . . . | |
| const path = require('path'); | |
| module.exports = { | |
| projectRoot: path.resolve(__dirname, '../'), | |
| . . . | |
| }; | |
| . . . |
This file contains hidden or 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
| . . . | |
| @Override | |
| protected String getJSMainModuleName() { | |
| return "app/index"; | |
| } | |
| . . . |
This file contains hidden or 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
| . . . | |
| #if DEBUG | |
| return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"app/index" fallbackResource:nil]; | |
| #else | |
| . . . |
This file contains hidden or 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
| . . . | |
| project.ext.react = [ | |
| enableHermes: false, | |
| entryFile: "app/index.js", | |
| root: "../../../", | |
| cliPath: '../../../node_modules/react-native/cli.js' | |
| ] | |
| apply from: "../../../node_modules/react-native/react.gradle" | |
| . . . |
NewerOlder