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

React · Errors and warnings · all subjects

react errors/special-props

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

Special props ref and key are not forwarded to components

The special props `ref` and `key` are used by React internally and are not forwarded to the component. You cannot read `props.key` or `props.ref` from within a component.

How to pass a key value into a component

If you need to access the same value as the key within the child component, pass it as a different prop with a different name. For example, use `<ListItemWrapper key={result.id} id={result.id} />` and read `props.id` instead of trying to access `props.key`.

Why key and ref must not be forwarded

It is important to separate app logic from hints to React. The key and ref props are hints for React's internal use and should not be confused with regular component logic.

Give your agent this brain