Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const validateMethod = function(propName) {
const propNameA = propName.replace(OVERRIDE_REGEXP, '')
if (!LIFECYCLE.includes(propNameA) && LEGACY_LIFECYCLE[propNameA] === undefined) {
throw new Error(`Invalid event '${propNameA}'.
Please use a valid event name. One of:
${serializeList(LIFECYCLE)}`)
}
}