Describe the bug#
Hello, I realize that this is still pre-release so maybe this is to be ignored, but wanted to document the change just in case others also ran into this because it seems to have changed the api in tanstack/form since its fieldApi exposes this store.
This PR (0.9.0) removed a previously available public property on the store called prevState which was exposed on fields stores in tanstack form which means I think that this was an unintentional breaking change for tanstack form.
I think this means people relying on this will need to pin to an older version of store or will need to find another way to get the previous value.
Steps to Reproduce the Bug or Issue#
Prior to the 0.9.0 release of tanstack/store you could do something like this in tanstack/form
fieldApi.store.prevState?.value
but now prevState is gone
Expected behavior#
I expect to continue to be able to use the api so long as I am on the same major version of tanstack/form.
Screenshots or Videos#
The change in this PR seems to have removed prevState despite it being exposed publicly (and previously and thus in tanstack form as well).
Platform#
Additional context#
No response
Apologies you've ran into this. Transparently,
prevStateshould have been never exposed in the first place. It was a known incidental side effect of how the hacky innards of Store worked in the past.I would have marked it
private, but couldn't because:We likely should have removed the documented property using
@privateas a result. I hadn't considered that anyone would try to use this.I think a wrapper atom should be fairly easy to implement in user-land depending on your needs, but transparently this was bad API design on this project (my fault) and I think it would be a bad idea to bring it back.
Form itself is stable, including documented
StoreAPIs referenced in it - butStoreitself always has been an alpha release.