maplibre-react-native
maplibre-react-native copied to clipboard
Migrate MapView to react function components
Description
Migrated the MapView component to use function components. Also migrated the functionality of the NativeBridgeComponent to a hook(left other components using the old component untouched for now)
I had to add the following rules in the eslintrc as the current config is to eager on errors and some required rules might result in breaking changes.
'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn',
The purpose of this series of PRs is not to make too many changes/fixes to the current codebase just convert the components to function components.
Fixes #50
Checklist
- [x] I have tested this on a device/simulator for each compatible OS
- [x] I formatted JS and TS files with running
yarn lint:fix
in the root folder - [x] I have run tests via
yarn test
in the root folder - [x] I updated the documentation with running
yarn generate
in the root folder - [ ] I mentioned this change in
CHANGELOG.md
- [ ] I updated the typings files (
index.d.ts
) - [ ] I added/updated a sample (
/example
)