Skip to content

Commit

Permalink
fix(app): switch example app to TypeScript
Browse files Browse the repository at this point in the history
release-npm
  • Loading branch information
tobua committed Sep 30, 2023
1 parent d2f0674 commit e1d853e
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package-lock.json
dist
ReactigationApp
app/**/*
!app/index.js
!app/App.tsx
!app/logo.png
!app/component
!app/component/*
8 changes: 2 additions & 6 deletions app/index.js → app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react'
import { AppRegistry } from 'react-native'
import Reactigation, { register, Transition } from 'reactigation'
import { name as appName } from './app.json'
import { Static } from './component/Static'
import { Screen } from './component/Screen'
import { Modal } from './component/Modal'
Expand Down Expand Up @@ -33,14 +31,12 @@ Object.entries(Screens).map(([name, configuration]) =>
register(configuration.component, name, {
transition: configuration.transition,
background: configuration.background,
})
}),
)

const App = () => (
export default () => (
<>
<Reactigation />
<Static />
</>
)

AppRegistry.registerComponent(appName, () => App)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion create-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ execSync(`npx react-native init ${appName}`, {
})

cpSync('app/component', `${appName}/component`, { recursive: true })
cpSync('app/index.js', `${appName}/index.js`)
cpSync('app/App.tsx', `${appName}/App.tsx`)
cpSync('app/logo.png', `${appName}/logo.png`)

rmSync('app', { recursive: true })
Expand Down

0 comments on commit e1d853e

Please sign in to comment.