revenge-next-plugs/plugins
Ally Founder d5e2c25e15 staff-tags: fix afterRendered crash on memo-wrapped components, bump to 1.0.7
Confirmed live: opening the member list crashed with "TypeError: target is
not callable" inside React's renderWithHooks. afterRendered patched
element.type directly, which works for plain function components but not
for UserRow (React.memo()-wrapped): patching the non-callable memo wrapper
object replaces it with a proxy whose *own* stub is callable, which makes
`typeof element.type === 'function'` true even though the real value is a
memo object - React's reconciler checks that before checking $$typeof, so it
takes the plain-function-component path and calls the proxy directly, whose
apply trap forwards to Reflect.apply(realMemoWrapper, ...) and throws, since
the real wrapper was never callable.

Fix: detect a memo-wrapped type and patch its inner .type (the actual render
function memo hides) instead of the wrapper itself - genuinely callable, and
leaves the wrapper's own shape untouched so React's type detection stays
correct. Shared in lib/afterRendered.ts, so it fixes UserRow now and any
future memo-wrapped target automatically.
2026-08-08 22:51:28 -04:00
..
next-eval-checks Bump versions for the author-name change (staff-tags 1.0.6, next-eval-checks 1.0.5) 2026-08-08 22:38:15 -04:00
staff-tags staff-tags: fix afterRendered crash on memo-wrapped components, bump to 1.0.7 2026-08-08 22:51:28 -04:00