Skip to content

Commit

Permalink
fix: mobx dependency changed to "^4.x || ^5.x"
Browse files Browse the repository at this point in the history
fix #62
  • Loading branch information
nareshbhatia committed Mar 30, 2019
1 parent ddf0e24 commit 8dbf0b8
Show file tree
Hide file tree
Showing 6 changed files with 1,014 additions and 647 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package.json
package-lock.json
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ MobX-powered router for React apps.
## Features

- State is decoupled from the UI. UI is simply a function of the state.
- UI is no longer responsible for fetching data. Data is now fetched during state transitions using router hooks.
- The router can override routing requests based on the application state. For example, it can redirect to the Sign In page if the user is not logged in.
- UI is no longer responsible for fetching data. Data is now fetched during
state transitions using router hooks.
- The router can override routing requests based on the application state. For
example, it can redirect to the Sign In page if the user is not logged in.
- Supports
- 404 (Not Found) errors
- Server-Side Rendering
Expand All @@ -20,9 +22,15 @@ MobX-powered router for React apps.

## Contributors

When making a pull request, make sure that your commit messages conform to the [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). Doing so allows us to automate the whole package release workflow using [semantic-release](https://github.com/semantic-release/semantic-release).
When making a pull request, make sure that your commit messages conform to the
[Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
Doing so allows us to automate the whole package release workflow using
[semantic-release](https://github.com/semantic-release/semantic-release).

To simplify this process, we have included [Commitizen](http://commitizen.github.io/cz-cli/) as a dependency of this project. Always execute the following two commands to commit to your repo. This will prompt you to fill out any required commit fields interactively.
To simplify this process, we have included
[Commitizen](http://commitizen.github.io/cz-cli/) as a dependency of this
project. Always execute the following two commands to commit to your repo. This
will prompt you to fill out any required commit fields interactively.

```
$ git add --all
Expand All @@ -31,13 +39,23 @@ $ yarn cz-commit

## Credits

mobx-state-router is based on ideas from several Open Source projects. I am grateful to the developers of these projects for their contributions. Special thanks go to the following contributions:
mobx-state-router is based on ideas from several Open Source projects. I am
grateful to the developers of these projects for their contributions. Special
thanks go to the following contributions:

[How to decouple state and UI (a.k.a. you don’t need componentWillMount)](https://hackernoon.com/how-to-decouple-state-and-ui-a-k-a-you-dont-need-componentwillmount-cc90b787aa37)\
This article by [Michel Weststrate](https://twitter.com/mweststrate) provided the initial inspiration for writing mobx-state-router. It explains the downsides of mixing State and UI and how to untangle the mess!
This article by [Michel Weststrate](https://twitter.com/mweststrate) provided the
initial inspiration for writing mobx-state-router. It explains the downsides of mixing
State and UI and how to untangle the mess!

[mobx-router](https://github.com/kitze/mobx-router)\
This library by [Kitze](https://github.com/kitze) is a good implementation of Michel Weststrate's ideas. I have borrowed some concepts from this implementation and then added my own. Thanks Kitze!
This library by [Kitze](https://github.com/kitze) is a good implementation of Michel
Weststrate's ideas. I have borrowed some concepts from this implementation and then
added my own. Thanks Kitze!

[router5](https://github.com/router5/router5)\
This is a more extensive library for routing. It's unique feature is that routes are organized as a tree, made of segments and nodes. It aims to be framework agnostic and uses middleware and plugins to adapt to different frameworks. Of course, with flexibility comes complexity. mobx-state-router makes some choices for you to keep the overall learning curve simple.
This is a more extensive library for routing. It's unique feature is that routes
are organized as a tree, made of segments and nodes. It aims to be framework agnostic
and uses middleware and plugins to adapt to different frameworks. Of course, with
flexibility comes complexity. mobx-state-router makes some choices for you to keep
the overall learning curve simple.
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,53 +31,53 @@
"report-coverage": "cat ./coverage/lcov.info | coveralls",
"cz-commit": "git-cz",
"semantic-release": "semantic-release",
"format": "prettier --write '{src,test}/**/*.ts*'"
"format": "prettier --write README.md '{src,test}/**/*.ts*'"
},
"dependencies": {
"path-to-regexp": "^3.0.0",
"query-string": "^5.1.1"
},
"peerDependencies": {
"history": "^4.x",
"mobx": "^4.x",
"mobx": "^4.x || ^5.x",
"mobx-react": "^5.x",
"react": "^16.x"
},
"devDependencies": {
"@commitlint/cli": "^7.5.2",
"@commitlint/config-conventional": "^7.5.0",
"@types/enzyme": "^3.9.0",
"@types/enzyme": "^3.9.1",
"@types/history": "^4.7.2",
"@types/jest": "^24.0.9",
"@types/node": "^11.10.4",
"@types/jest": "^24.0.11",
"@types/node": "^11.12.2",
"@types/query-string": "^5.1.0",
"@types/react": "^16.8.6",
"@types/react-dom": "^16.8.2",
"@types/react": "^16.8.10",
"@types/react-dom": "^16.8.3",
"colors": "^1.3.3",
"commitizen": "^3.0.7",
"coveralls": "^3.0.3",
"cz-conventional-changelog": "^2.1.0",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.10.0",
"history": "^4.7.2",
"enzyme-adapter-react-16": "^1.11.2",
"history": "^4.9.0",
"husky": "^1.3.1",
"jest": "^24.1.0",
"mobx": "^4.9.2",
"jest": "^24.5.0",
"mobx": "^5.9.4",
"mobx-react": "^5.4.3",
"prettier": "^1.16.4",
"pretty-quick": "^1.10.0",
"prompt": "^1.0.0",
"react": "^16.8.3",
"react-dom": "^16.8.3",
"replace-in-file": "^3.4.3",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"replace-in-file": "^3.4.4",
"rimraf": "^2.6.3",
"semantic-release": "^15.13.3",
"ts-jest": "^24.0.0",
"ts-node": "^8.0.2",
"tslint": "^5.13.1",
"ts-jest": "^24.0.1",
"ts-node": "^8.0.3",
"tslint": "^5.14.0",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^8.0.1",
"typescript": "^3.3.3333"
"typescript": "^3.4.1"
},
"husky": {
"hooks": {
Expand Down
5 changes: 5 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
tabWidth: 4,
singleQuote: true,
proseWrap: 'always'
};
Loading

0 comments on commit 8dbf0b8

Please sign in to comment.