Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate this package? #18

Open
capaj opened this issue Apr 20, 2019 · 9 comments
Open

Deprecate this package? #18

capaj opened this issue Apr 20, 2019 · 9 comments
Labels

Comments

@capaj
Copy link
Member

capaj commented Apr 20, 2019

It would be nice to add a depreciation notice once preact X gets released as it should be possible to just use mobx-react.
Or am I wrong to assume that it is not needed anymore?

@philmander
Copy link
Collaborator

When it does get released and the value of this project is no more; then lets look at it

@capaj
Copy link
Member Author

capaj commented Sep 23, 2019

In April I assumed it would be released much much sooner.

@danielkcz
Copy link

danielkcz commented Oct 22, 2019

I don't really follow development of Preact, but how much is this true?

https://github.com/marvinhagemeister/preact-faq/blob/master/migrate-to-x.md#mobx-preact

If it is correct, was there some actual testing to confirm the compatibility? It should be mentioned in the README here in that case. I do maintain mobx-react-lite and mobx-react and I certainly don't like that you are sending people in our direction without the previous discussion. If someone can confirm 100% compatibility, we can surely add a note to docs as well for mobx-react, but so far it feels like "fingers crossed, it works".

I've skimmed through the readme here and we don't support componentWillReact anymore and also no connect utility is present. That really doesn't feel like full compatibility. You should offer some migration path in here in that case.

@korgon
Copy link

korgon commented Oct 14, 2020

Preact X has been out some time now... and with the release of MobX 6, I am wondering if we will see a new version of mobx-preact here? Or should Preact users be looking instead to mobx-react-lite and mobx-react for their needs?

@danielkcz
Copy link

Would be nice if someone can actually confirm it works with mobx-react. I don't care about Preact enough to give it a try :)

@korgon
Copy link

korgon commented Oct 15, 2020

I am using it now - and it works... for the most part.

preact: 10.4.8
mobx: 6.0.1
mobx-react: 7.0.0

I have only noticed one issue so far - and that is the render function is not being passed the props or state arguments (class components).

From the Preact site (https://preactjs.com/guide/v10/differences-to-react):

Arguments in Component.render()
For convenience we pass this.props and this.state of a class component to the render().

Would this difference justify the existence of a separate package for Preact (mobx-preact)? I'll keep working with it and see if I encounter any other issues/discrepancies.

@ghost
Copy link

ghost commented Aug 23, 2021

There is a big chance I'm doing something wrong, but currently it looks like mobx-react is using react-dom. So it won't work as an alternative for dedicated package for mobx integration.

The error:

@parcel/core: Failed to resolve 'react-dom' from './node\\_modules/mobx-react-lite/dist/mobxreactlite.cjs.development.js'
...\node_modules\mobx-react-lite\dist\mobxreactlite.cjs.development.js:10:24
   9 | var React__default = _interopDefault(React);
> 10 | var reactDom = require('react-dom');

Versions:

    "preact": "^10.5.14",
    "mobx": "^6.3.2",
    "mobx-react": "^7.2.0",

@korgon
Copy link

korgon commented Aug 24, 2021

@dcbrwn
Maybe you just need to setup some aliases for your bundler?
https://preactjs.com/guide/v8/switching-to-preact/#aliasing-via-parcel

@ghost
Copy link

ghost commented Aug 24, 2021

Well aliases are unpredictable, unstable borderline hack, so the mobx adapter for preact still deserves a dedicated package IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants