@housecor The record should have a “version” field which bumps on every update.
This field is mandatory on API side (in input), so if a gateway receive an old version then it could return 409 conflict to the client
@TkDodo Useful but not needed.
Signature:
setData: ((data: TData) => void) | ((updateFn: (prevData: TData) => TData) => void)
If create an element on a list in this way a user does not need to read from cache, update and then write to cache
@mattpocockuk Missing assertion matcher for refinements / missing narrowing for example on tagged unions:
expect(foo.tag).toBe(‘myTag’) | expect(bar).toBe(E.right(expect.anything()))
@v8js The switch statement is using the catched `err` (which is probably an instance of Error) , but for the case statements you are using strings. How is it possibile? 😅
@ryanflorence The issue is the signature of Array.prototype.find . If you use a function `find<A>(arr: A[], predicate: (a: A) => boolean): undefined | A` typescript will help you a lot more on spotting this kind of bug
@mjackson You can use this function: `declare function unsafeCoerce<A, B>(a: A): B`
Where A is the "problematic" type you have, and B Is the correct type you want.
With this function you can work with type safety After the coercion (instead of working with `any`)
@vincentriemer translateX/Y should be more performant than top/left properties because it happens in the composite stage (end of the pipeline) and not in the layout stage, which can cause page reflow.
See: https://t.co/UQ6Nkbyk7G