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

extendObservable: remove constraint for existing property #2252

Conversation

davefeucht
Copy link
Contributor

@davefeucht davefeucht commented Jan 9, 2020

Currently extendObservable throws an error if you try to use it on a property which already exists in the target object/class. This makes it impossible to dynamically make an existing property observable.

  • Added unit tests
  • Updated changelog
  • Updated /docs. For new functionality, at least API.md should be updated
  • Added typescript typings
  • Verified that there is no significant performance drop (npm run perf)

Feel free to ask help with any of these boxes!

The above process doesn't apply to doc updates etc.

@davefeucht davefeucht changed the title Extend observable remove constraint for existing property extendObservable: remove constraint for existing property Jan 9, 2020
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@mweststrate mweststrate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I think we are pretty close, left 2 comments

Copy link
Member

@mweststrate mweststrate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! Thanks a lot.

This change might need backporting to MobX 4? cc @kr_anand_mishra

@davefeucht
Copy link
Contributor Author

Yeah, I actually specifically need it for Mobx4 :)

@davefeucht
Copy link
Contributor Author

Do you have an idea how long until it will be released, by the way?

@mweststrate
Copy link
Member

I'm a little behind with cutting releases, but early next week should be doable I think. Would that work for you?

If interested, feel free to open a PR against mobx4-master as well and cherry-pick the changes (only test and implementation)

We are working on making that process smoother😅

@davefeucht
Copy link
Contributor Author

Yeah, early next week should be fine. I’ll make an MR for mobx4-master first thing in the morning with just the code and tests.

@mweststrate
Copy link
Member

THanks!

@mweststrate mweststrate merged commit a217a62 into mobxjs:master Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants