rrousselGit / flutter_hooks

React hooks for Flutter. Hooks are a new kind of object that manages a Widget life-cycles. They are used to increase code sharing between widgets and as a complete replacement for StatefulWidget.
MIT License
3.06k stars 175 forks source link

about the useMemoized API description #391

Closed gcback closed 8 months ago

gcback commented 8 months ago

about the useMemoized API description

I understood the previous sentence to mean that when the keys change, 'useMemoized' creates a new instance and caches it. However, if this is the intended meaning, it seems more appropriate to call 'valueBuilder' again rather than recalling 'useMemoized'. Could it be a simple typo?

original description

A subsequent call of useMemoized... "A subsequent call of useMemoized with different keys will call useMemoized again to create a new instance."