Open JasonSooter opened 6 years ago
@functionalStoic April 2019 here. I tried this library on CodeSandbox. Seems to be working so far.
But what I do know from the latest React docs that the componentWillMount
and componentWillReceiveProps
lifecycle methods (segments down below) will be phased out (official blog post), and unfortunately, this library still makes use of them:
I'd wager this is what needs to be done next:
componentDidMount
statements to the constructor
; since all those methods are doing is just setting initial state, those methods might as well be called in the constructor
method.componentWillReceiveProps
statement to componentDidUpdate
; okay, this, I admit I don't grasp fairly well, so I'm dealing with this at face value.@andrewsantarin Thanks for the thoughtful review and recommendation. Unfortunately, I do not have react-localforage
in production and no bandwidth to chime in on your recommendations. Hopefully, this will be helpful to others.
Figured I'd try this out on my own because I find the pattern in this library quite useful for my needs, although the library itself isn't: https://codesandbox.io/s/young-brook-3hn0g, with TypeScript, on top of that. What I've got is almost exactly what I'm using right now for work.
Not a pull request yet by any stretch of the imagination, since it's only the <GetItem>
segment.
I'll have to conjure my own repo, perhaps?
Any knowledge of if this package works with 16.3?
I could make a PR and give it a shot if that is unknown and you are willing.
Looks like exactly what I need but I want to know its still active ;-)
Thanks!