microstates
microstates copied to clipboard
Is this library stable?
Hello there,
First at all, thank you guys for making this library.
We are considering using this library in production but Im wondering if it is ready for production.
I see the coverage is 100%. Well done!!
Still since the version of this package is in version 0 Im wondering if it has a stable API. Usually version 0.X.Y means that it is not stable yet.
In regards to that, Is version 0.X.Y still under heavy development ? Is this library using sematic versioning?
Thank you for this awesome job!
Hi @alberto-f!
Thanks for considering Microstates for your application. As always, the question of whether something is "ready" for production is subjective. We are currently using the released version and it is (as far as we know) bug free, but we do use semver and as you point out, the 0
major version does mean that we do foresee some changes to the API before we're comfortable placing a 1
on it.
Here is the roadmap of the changes we plan on making before 1.0
- removing the
.state
property on primitive microstates, and instead using a.value
property for every microstate:
before:
create(Number, 4).state //=> 4
valueOf(create(Object, {})) //=> Object {}
after
create(Number, 4).value //=> 4
create(Object, {}).value //=> Object {}
-
Atomic values. Currently, each microstate references its own value. We will probably move to an internal representation where each microstate references a path to a location within a single atom held by the top-level microstate. This will allow microstates in one portion of the tree to reference each other without changing the internal structure of the original value. Mostly this will be an invisible change, but it is significant to warrant mention.
-
1st class support for TypeScript. It's very important that Microstates work seamlessly with TypeScript. We're not sure what changes will be required here, there's a real possibility that the could be breaking.
-
We've developed some slightly different patterns for using microstates with the https://github.com/thefrontside/effection.js library which makes some current features that are bundled with microstates (such as the store, and the stable values) optional. It's very possible that we will bundle
Store
separately in the future. This isn't a breaking change in API other than where you would import it from:
before
import { Store } from 'microstates';
after
import { Store } from `@microstates/store`;
I hope that helps answer your question. The API has been stable for a while now, but will change. However, we are conscientious of semver and would not release breaking changes without at the very least iterating on the minor version number, and once we do reach 1.0
always iterating the major version with a breaking change.
Thank you very much for providing this information. :)