We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If component has no props, it will not be cached.
const canCache = (opts = cacheComponents[name]) && opts.enable && !(transaction._cached || _.isEmpty(saveProps) || typeof saveProps.children === "object");
Maybe remove _.isEmpty(saveProps) check?
_.isEmpty(saveProps)
The text was updated successfully, but these errors were encountered:
Seeing this as well. Stupid simple components without props are prime candidates for caching imo.
Sorry, something went wrong.
When saveProps.children is null, typeof saveProps.children will return "object“
@niklaus0823 so is this a bug or the intended behaviour? should https://github.com/electrode-io/electrode-react-ssr-caching/blob/master/lib/ssr-caching.js#L242 be something like the below instead?
_.isEmpty(saveProps) || (saveProps.children && typeof saveProps.children === "object"));
Can one of the core maintainers chip in on this to see if I should open PR?
No branches or pull requests
If component has no props, it will not be cached.
Maybe remove
_.isEmpty(saveProps)
check?The text was updated successfully, but these errors were encountered: