- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
53 lines
1.4 KiB
Markdown
53 lines
1.4 KiB
Markdown
# babel-plugin-react-native-web
|
|
|
|
[![npm version][package-badge]][package-url] [](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request)
|
|
|
|
A Babel plugin that will alias `react-native` to `react-native-web` and exclude
|
|
any modules not required by your app (keeping bundle size down).
|
|
|
|
## Installation
|
|
|
|
```
|
|
npm install --save-dev babel-plugin-react-native-web
|
|
```
|
|
|
|
## Usage
|
|
|
|
**.babelrc**
|
|
|
|
```
|
|
{
|
|
"plugins": [
|
|
["react-native-web", { commonjs: true }]
|
|
]
|
|
}
|
|
```
|
|
|
|
You should configure the plugin to match the module format used by your
|
|
bundler. Most modern bundlers will use a package's ES modules by default (i.e.,
|
|
if `package.json` has a `module` field). But if you need the plugin to rewrite
|
|
import paths to point to CommonJS modules, you must set the `commonjs` option
|
|
to `true`.
|
|
|
|
## Example
|
|
|
|
NOTE: `react-native-web` internal paths are _not stable_ and you must not rely
|
|
on them. Always use the Babel plugin to optimize your build. What follows is an
|
|
example of the rewrite performed by the plugin.
|
|
|
|
**Before**
|
|
|
|
```js
|
|
import { StyleSheet, View } from 'react-native';
|
|
```
|
|
|
|
**After**
|
|
|
|
```js
|
|
import StyleSheet from 'react-native-web/dist/exports/StyleSheet';
|
|
import View from 'react-native-web/dist/exports/View';
|
|
```
|
|
|
|
[package-badge]: https://img.shields.io/npm/v/babel-plugin-react-native-web.svg?style=flat
|
|
[package-url]: https://www.npmjs.com/package/babel-plugin-react-native-web
|