Home App Docs Blog Github

How to fix "renderLink is not a function" errors?

BuilderComponent accepts a renderLink function that allow the user to override all links rendered inside a builder content, this is especially helpful if you’d like to do client side routing for local links (like in next.js or gatsby)

You can run into this error when providing a non-function value to the prop, this is how you pass the renderLink function:

// MyCustomLink should accept props of type `React.AnchorHTMLAttributes` 
<BuilderComponent renderLink={ props => <MyCustomLink {...props} /> } ...