new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Redux Toolkit · API · all subjects

prepareautobatched

2 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

prepareAutoBatched signature and return type

prepareAutoBatched is a generic function with signature: type prepareAutoBatched = <T>() => (payload: T) => { payload: T; meta: unknown }. It returns a function that accepts a payload and returns an object with the payload and meta field containing SHOULD_AUTOBATCH: true.

prepareAutoBatched usage with createSlice

prepareAutoBatched is meant to be used with createSlice's prepare callback syntax. When specified as the prepare function for a reducer, it automatically adds action.meta[SHOULD_AUTOBATCH]: true to the action.

Give your agent this brain