Mark Erikson

Results 1264 comments of Mark Erikson

No. `shallowEqual` is a standalone function that can be used separately, and it literally does accept `any` arguments. That's kind of the point of the function in the first place:...

Yeah, it's the previous and current selected value that are passed to the compare function. In other words, the point is to decide "has the selected value changed at all?"...

@alvamanu : The type signature is: ```ts export type EqualityFn = (left: any, right: any) => boolean; ``` (loosely - I haven't added that specific type to the typedefs) In...

Yeah, and that is the default behavior of `useSelector` already - it does that exact `===` comparison if you _don't_ provide an `equalityFn` yourself

What's the actual issue this PR is supposed to fix?

No, the TS compiler is set up to effectively just strip the types. For that example, the TS source is: ```ts import { createSlice, PayloadAction } from '@reduxjs/toolkit' interface CounterState...

the only page layout change I'm seeing is that the code block shrinks when you go TS->JS, because there's just fewer lines of code to show. Anything else beyond that?

@chaabaj, @pixelgoo : we specifically recommend using our official Redux Toolkit package, which A) is already written in TS, and B) will auto-generate action creators for you: https://redux-toolkit.js.org

@pixelgoo FWIW: - RTK is UI-agnostic, like the Redux core, and you can use it with any UI layer. Also, reducers are rarely perf bottlenecks - it's the cost of...

Partly done-ish, but could use some more updates.