React Native notes¶
TypeScript¶
Herald works the same on every platform. Where TypeScript differs:
- A number says its type:
int(3)ordouble(9.99), because JavaScript can't tell3from3.0. A bare number doesn't compile. - Labels are fields, such as
readonly isScreenView = true, because TypeScript interfaces don't exist when the app runs. Your own markers work the same way. - Events are classes, because factories pick them with
instanceof. - Calls don't wait for each other. When order matters, such as turning collection off before
tracking,
awaitthe first call. A call never fails: a vendor's error goes to your error reporter. - Setup mistakes throw when the app sets up Herald, with a message saying what to change.