mobxjs / mobx-state-tree

Full-featured reactive state management without the boilerplate
https://mobx-state-tree.js.org/
MIT License
6.94k stars 640 forks source link

Find a new home for `mst-example-bookshop` #2014

Closed coolsoftwaretyler closed 1 year ago

coolsoftwaretyler commented 1 year ago

As part of our effort to move away from monorepo architecture, we'll need to find an appropriate place to put the mst-example-bookshop. That way we can update references to this example to point elsewhere (perhaps a new repository?) and keep it around for folks who reference it in any sort of educational materials.

coolsoftwaretyler commented 1 year ago

Gonna get started on this today/hopefully through next week.

coolsoftwaretyler commented 1 year ago

Hey @jamonholmgren - I made a first attempt at extracting mst-example-bookshop somewhere else. I put together this repository on my personal GitHub account: https://github.com/coolsoftwaretyler/mst-example-bookshop

This repository is a copy/paste of the mst-example-bookshop code from commit 50e6df954da72fd2875bffb14bda0d59e134c792, most recent master at time of writing, but with a handful of changes:

  1. I added .nvmrc and .tool-versions to support nvm and asdf version managers.
  2. I bumped react-scripts to the latest version, 5.0.1 to resolve some noisy errors that were coming from outdated fsevents. The upgrade seemed to work just fine. Tests passed (except for one that was failing anyway), and the site at yarn start looks reasonable to me.
  3. There was one failed test because react-scripts couldn't find jasmine anymore. This was failing even before the react-scripts update, so may be an error in the current repo at 50e6df954da72fd2875bffb14bda0d59e134c792. I switched over to using jest.fn(), and updated some assertions to use .mock.calls.length instead of alertSpy.calls.length().
  4. I have updated the package version to 3.0.0 just to communicate there is a set of changes that may or may not break here.

Do you think it would make sense for us to add it to the repositories at https://github.com/mobxjs, or somewhere else? I figured we could hash that out with this example before we figure it out for the other examples.

jamonholmgren commented 1 year ago

If you're willing to have it under your name, I'd prefer that! It reduces the expectation of keeping it perfectly up to date. Just add me as a collaborator so I can make changes if you're not around.

coolsoftwaretyler commented 1 year ago

Will do on all accounts. I will take that approach with the other examples, as well.

coolsoftwaretyler commented 1 year ago

Fully migrated over to https://github.com/coolsoftwaretyler/mst-example-bookshop, updated README with notes on the original authors/location.