mobxjs / mobx-state-tree

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

Add union tips #2078

Closed chakrihacker closed 9 months ago

chakrihacker commented 10 months ago

What does this PR do and why?

Add Docs about union bugs and how to write better union types

Steps to validate locally

Not necessary

closes #1907

coolsoftwaretyler commented 9 months ago

Hey @chakravarthi-bb - I'm sorry I didn't see this before. I've been really busy at work + I don't seem to get notifications for PRs in this repo? I'm going to turn on my notifications + get around to reviewing this after we ship 5.2.0. Sorry to leave you hanging there, but thank you for the PR!

coolsoftwaretyler commented 9 months ago

Looks great, @chakrihacker! I'm going to merge this in now. It'll hit the docs page once we do another release and update that.

I think right now our docs are a little too coupled to our versioning, which can be a bit of a pain. If we want to ship it faster, we could release a patch version that ships this specifically.

Either way, this is good to merge. Thank you!

chakrihacker commented 9 months ago

Thanks for merging this