Custom code works in preview, but not on published site

Fantastic! Yep, this did the trick.

I was not aware of the alternative method for supplying the urlPath to the BuilderComponent object. Is that documented somewhere? I believe leveraging the useEffect() function came about when I followed the existing documentation associated with builder.io’s React packages. Given that this method is more straightforward, I definitely would have opted for it had I known about it!

Thank you for the extensive help you provided and the digging you had to do. I appreciate it!

@ReavoEnd yes! Any queries, userAttributes, options etc that you pass into the builder.get() call can just as easily be passed into the <BuilderComponent />, its just that anything in the will be only run client side. Since you were using client rendering anyways, it is a much simpler approach

Generally, builder.get() is best for server side getting of content to pass into the . I will talk with the team about when how and if we should adjust our docs to clarify, thank you for brining to our attention!

1 Like