{"record":{"id":"6ffa6a6473112fed","repo":"facebook/react","slug":"expected-registrationname-listener-to-be-a-fu","errorCode":null,"errorMessage":"Expected `${registrationName}` listener to be a function, instead got a value of `${typeof listener}` type.","messagePattern":"Expected `(.+?)` listener to be a function, instead got a value of `(.+?)` type\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-dom-bindings/src/events/getListener.js","lineNumber":72,"sourceCode":"): Function | null {\n  const stateNode = inst.stateNode;\n  if (stateNode === null) {\n    // Work in progress (ex: onload events in incremental mode).\n    return null;\n  }\n  const props = getFiberCurrentPropsFromNode(stateNode);\n  if (props === null) {\n    // Work in progress.\n    return null;\n  }\n  // $FlowFixMe[invalid-computed-prop]\n  const listener = props[registrationName];\n  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n    return null;\n  }\n\n  if (listener && typeof listener !== 'function') {\n    throw new Error(\n      `Expected \\`${registrationName}\\` listener to be a function, instead got a value of \\`${typeof listener}\\` type.`,\n    );\n  }\n\n  return listener;\n}\n","sourceCodeStart":54,"sourceCodeEnd":79,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-dom-bindings/src/events/getListener.js#L54-L79","documentation":"Error \"Expected `${registrationName}` listener to be a function, instead got a value of `${typeof listener}` type.\" thrown in facebook/react.","triggerScenarios":"Thrown at packages/react-dom-bindings/src/events/getListener.js:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}