Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Commit afc8c9a

Browse files
committed
➖ (mobx) remove mobx dependencies
1 parent 82b7b75 commit afc8c9a

7 files changed

Lines changed: 23 additions & 72 deletions

File tree

docs/GettingStarted.mdx

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ route: /getting-started
99

1010
React-gondola needs the following dependencies; if you do not have those installed, you need to install them with the correspondig command:
1111

12-
| Dependencie name | Yarn Installation command | NPM Installation command |
13-
| :--------------: | :--------------------------: | :-----------------------: |
14-
| `mobx` | `yarn add mobx@5.0.0` | `npm i mobx@5.0.0` |
15-
| `mobx-react` | `yarn add mobx-reactx@5.0.0` | `npm i mobx-reactx@5.0.0` |
16-
| `mobx-utils` | `yarn add mobx-utilsx@5.0.0` | `npm i mobx-utilsx@5.0.0` |
17-
| `rxjs` | `yarn add rxjs` | `npm i rxjs` |
12+
| Dependencie name | Yarn Installation command | NPM Installation command |
13+
| :--------------: | :-----------------------: | :----------------------: |
14+
| `rxjs` | `yarn add rxjs` | `npm i rxjs` |
1815

1916
Then, install React-Gondola with:
2017

@@ -31,22 +28,22 @@ or
3128
In order to create a canal, use the `createCanal` function. Pass it your screens in the business order.
3229

3330
```ts
34-
import React from "react";
35-
import { createCanal } from "react-gondola";
36-
import { FirstName } from "./FirstName";
37-
import { LastName } from "./LastName";
31+
import React from 'react';
32+
import { createCanal } from 'react-gondola';
33+
import { FirstName } from './FirstName';
34+
import { LastName } from './LastName';
3835

3936
const SignInCanal = createCanal([
40-
{ name: "firstName", Component: FirstName },
41-
{ name: "lastName", Component: LastName }
37+
{ name: 'firstName', Component: FirstName },
38+
{ name: 'lastName', Component: LastName },
4239
]);
4340
```
4441

4542
Then, use the canal wherever you want in your app. Specify whether to show/hide a screen by using the screen's name as a prop:
4643

4744
```ts
48-
import React, { Component } from "react";
49-
import { SignInCanal } from "./canals/SignIn";
45+
import React, { Component } from 'react';
46+
import { SignInCanal } from './canals/SignIn';
5047

5148
export default class App extends Component {
5249
render() {
@@ -62,24 +59,24 @@ That's all !
6259
If you want to add full screen page, pass the `isFullScreen` flag to the right page when creating a canal. In the following example, `confirm` is a full screen page.
6360

6461
```ts
65-
import React from "react";
66-
import { createCanal } from "react-gondola";
67-
import { FirstName } from "./FirstName";
68-
import { LastName } from "./LastName";
62+
import React from 'react';
63+
import { createCanal } from 'react-gondola';
64+
import { FirstName } from './FirstName';
65+
import { LastName } from './LastName';
6966

7067
const SignInCanal = createCanal([
71-
{ name: "firstName", Component: FirstName },
72-
{ name: "lastName", Component: LastName },
73-
{ name: "confirm", Component: Confirm, isFullScreen: true }
68+
{ name: 'firstName', Component: FirstName },
69+
{ name: 'lastName', Component: LastName },
70+
{ name: 'confirm', Component: Confirm, isFullScreen: true },
7471
]);
7572
```
7673

7774
In order to render the full screen page at the top level in your app, add the `FullScreenPortal` at the top level in your rendering tree.
7875

7976
```ts
80-
import React, { Component } from "react";
81-
import { SignInCanal } from "./canals/SignIn";
82-
import { FullScreenPortal } from "react-gondola";
77+
import React, { Component } from 'react';
78+
import { SignInCanal } from './canals/SignIn';
79+
import { FullScreenPortal } from 'react-gondola';
8380

8481
export default class App extends Component {
8582
render() {

example/metro.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ module.exports = {
2121
// asked by the "../src" but which
2222
// are not present in the ROOT/node_modules
2323
// See https://github.com/facebook/metro/issues/7#issuecomment-464668678.
24-
mobx: path.resolve(__dirname, '../node_modules/mobx'),
25-
'mobx-react': path.resolve(__dirname, '../node_modules/mobx-react'),
26-
'mobx-utils': path.resolve(__dirname, '../node_modules/mobx-utils'),
2724
react: path.resolve(__dirname, '../node_modules/react'),
2825
'react-native': path.resolve(__dirname, 'node_modules/react-native'),
2926
'@babel/plugin-proposal-decorators': path.resolve(

example/tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
"paths": {
3131
"react-gondola": ["../../src"],
3232
"react-gondola/*": ["../../src/*"],
33-
"mobx": ["../node_modules/mobx"],
34-
"mobx-react": ["../node_modules/mobx-react"],
3533
"react": ["../node_modules/react"],
3634
"react-native": ["../node_modules/react-native"],
3735
"react-native-reanimated": ["../node_modules/react-native-reanimated"]

jest/setup.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import { configure } from 'mobx';
2-
3-
configure({
4-
enforceActions: 'observed',
5-
});
6-
71
Date.now = jest.fn(() => 0);
82

93
jest.mock('react-native-reanimated/src/ReanimatedEventEmitter');

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
"declarative"
1515
],
1616
"peerDependencies": {
17-
"mobx": "5.x.x",
18-
"mobx-react": "5.x.x",
19-
"mobx-utils": "5.x.x",
2017
"react": "*",
2118
"react-native": "*"
2219
},
@@ -58,9 +55,6 @@
5855
"eslint-plugin-react": "^7.14.2",
5956
"jest": "^24.7.0",
6057
"metro-react-native-babel-preset": "^0.55.0",
61-
"mobx": "^5.9.4",
62-
"mobx-react": "^6.1.1",
63-
"mobx-utils": "^5.4.0",
6458
"patch-package": "^6.1.2",
6559
"postinstall-postinstall": "^2.0.0",
6660
"prettier": "^1.16.4",

tsconfig.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,8 @@
2222
"experimentalDecorators": true,
2323
"emitDecoratorMetadata": true,
2424
"lib": ["es6"],
25-
"types": ["react-native", "mobx-react"]
25+
"types": ["react-native"]
2626
},
2727
"include": ["./src"],
28-
"exclude": [
29-
"node_modules",
30-
"dist",
31-
"example",
32-
"**/__tests__/*",
33-
"**/*.test.ts",
34-
"**/*.test.tsx"
35-
]
28+
"exclude": ["node_modules", "dist", "example", "**/__tests__/*", "**/*.test.ts", "**/*.test.tsx"]
3629
}

yarn.lock

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9112,28 +9112,6 @@ mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
91129112
dependencies:
91139113
minimist "0.0.8"
91149114

9115-
mobx-react-lite@1.4.0:
9116-
version "1.4.0"
9117-
resolved "https://registry.yarnpkg.com/mobx-react-lite/-/mobx-react-lite-1.4.0.tgz#193beb5fdddf17ae61542f65ff951d84db402351"
9118-
integrity sha512-5xCuus+QITQpzKOjAOIQ/YxNhOl/En+PlNJF+5QU4Qxn9gnNMJBbweAdEW3HnuVQbfqDYEUnkGs5hmkIIStehg==
9119-
9120-
mobx-react@^6.1.1:
9121-
version "6.1.1"
9122-
resolved "https://registry.yarnpkg.com/mobx-react/-/mobx-react-6.1.1.tgz#24a2c8a3393890fa732b4efd34cc6dcccf6e0e7a"
9123-
integrity sha512-hjACWCTpxZf9Sv1YgWF/r6HS6Nsly1SYF22qBJeUE3j+FMfoptgjf8Zmcx2d6uzA07Cezwap5Cobq9QYa0MKUw==
9124-
dependencies:
9125-
mobx-react-lite "1.4.0"
9126-
9127-
mobx-utils@^5.4.0:
9128-
version "5.4.1"
9129-
resolved "https://registry.yarnpkg.com/mobx-utils/-/mobx-utils-5.4.1.tgz#18ff5f9723b27e1ff50ae0b362938a4792eb077a"
9130-
integrity sha512-u5BSvFiSx1ZkzBz/7V96RB7xWn7oOFwczI+AVi1v8TV8HbT8rXLco1Aqb87tEA8Jsc2e5uvTwHdYoiv81qspaA==
9131-
9132-
mobx@^5.9.4:
9133-
version "5.11.0"
9134-
resolved "https://registry.yarnpkg.com/mobx/-/mobx-5.11.0.tgz#58c64769bc2408ccde35fc2bac4cd5b8ae7b28a6"
9135-
integrity sha512-WMZCgjuW9vo2MhumrhJa0byTGdlZQcTKzLW9LoqMdmqVqWnG74HOSXWJ0YpxBngsc/rAUMwvdy+CVnw+/a4yeg==
9136-
91379115
modify-values@^1.0.0:
91389116
version "1.0.1"
91399117
resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"

0 commit comments

Comments
 (0)