react-doctor/no-prop-callback-in-render
Prop callback invoked during render
- Category: Bugs
- Severity: error
- Source:
oxlint-plugin-react-doctor - Framework: global
- Enabled when: react
- Default: Enabled
Validation prompt
Use this to decide whether a fired diagnostic is real or a false positive.
Confirm the reported code matches Prop callback invoked during render. Check the framework context and diagnostic message before suppressing it.
Fix prompt
Use this once validation confirms the diagnostic is real.
Invoke the callback from the event or asynchronous operation that produced the value, or from an effect when synchronizing with an external system. Render must stay pure because React can replay or discard it.
Related rules
More Bugs rules from the rules reference:
react-doctor/no-random-key: Replace the fresh-each-render key with a stable id from the item: key={item.id}react-doctor/no-ref-current-in-render: Ref mutated during renderreact-doctor/no-render-return-value: Disallow using the return value of ReactDOM.render — a legacy escape hatch removed in React 19.react-doctor/no-reset-all-state-on-prop-change: Disallow resetting all state in an effect when a prop changes.react-doctor/no-self-updating-effect: Break the self-updating-effect feedback loop: derive the value during render, move the write into an event handler, or guard the update so it provably converges.