Skip to content

Commit

Permalink
fix: example code refactor, changelog styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dimninik committed Sep 28, 2023
1 parent 9c05d74 commit 653c0c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## 3.0.0
## [3.0.0] - 2023-09-28

### Added

- Example project

### Changed

- Updated MultiplatformBleAdapter to version 0.2.0.
- Updated RN bridge config
- Changed CI flow
- Updated CI to RN 0.72.x
- Updated docs
- Updated dependencies
- Changed CI flow
- A example project has been added

### Fixed

- iOS 16 bugs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { AppButton, AppText, ScreenDefaultContainer } from '../../../components/
import type { MainStackParamList } from '../../../navigation/navigators'
import { BLEService } from '../../../services'
import { BleDevice } from '../../../components/molecules'
import { cloneDeep } from '../../../utils/cloneDeep'
import { DropDown } from './DashboardScreen.styled'

type DashboardScreenProps = NativeStackScreenProps<MainStackParamList, 'DASHBOARD_SCREEN'>
Expand All @@ -23,7 +24,7 @@ export function DashboardScreen({ navigation }: DashboardScreenProps) {
return prevState
}
// deep clone
const nextState: typeof prevState = JSON.parse(JSON.stringify(prevState))
const nextState = cloneDeep(prevState)
const extendedDevice: DeviceExtendedByUpdateTime = {
...device,
updateTimestamp: Date.now() + MIN_TIME_BEFORE_UPDATE_IN_MILLISECONDS
Expand Down
1 change: 1 addition & 0 deletions example/src/utils/cloneDeep.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const cloneDeep: <T>(objectToClone: T) => T = objectToClone => JSON.parse(JSON.stringify(objectToClone))

0 comments on commit 653c0c9

Please sign in to comment.