hoist-react
hoist-react copied to clipboard
Support `@persist`ing non-JSON based preference values via `PrefProvider`
I was in a bit of a rush when I first put in this ticket, but I believe the issue is that:
class MyModel extends HoistModel {
@persist.with({prefKey: 'faveNumber'})
faveNumber: number = 42;
}
does not work if we want the faveNumber
pref to be of type int
(vs. having pref be json
with a value like {faveNumber: 42}
, which would work but is sub-optimal when you really just want a primitive value)