Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
10 lines
487 B
Plaintext
10 lines
487 B
Plaintext
import React from 'react';
|
|
const LazyReactComponentSymbol = Symbol.for('react.lazy');
|
|
/**
|
|
* Since Next.js 15.4, `React.isValidElement()` returns `false` for components that cross the server-client boundary.
|
|
* This utility expands on that check so that it returns true for valid React elements.
|
|
*/
|
|
export function isValidReactElement(object) {
|
|
return React.isValidElement(object) || object?.['$$typeof'] === LazyReactComponentSymbol;
|
|
}
|
|
//# sourceMappingURL=isValidReactElement.js.map |