@builder.io/react 5.0.4: Custom component are not working anymore
Describe the bug Since the new version of the sdk, custom component using
Hello @MaximeGratens could you please share a small repro case?
@MaximeGratens what was the last version where this behaviour worked for you?
Hey guys,
So basically, we are using the builder.io/react with next js. The version working right now in production is "5.0.1". When I upgraded to version 5.0.4, all
I don't have any small repo to share with you. If I have times this week I will try but it's a basic next js project.
Still the same issue in 7.0.0. You can ask me more details by mail but for me it seems that the custom component using
Interesting - I just tried upgrading Next.js to version 15 and React to version 19 while using Builder 7. I got a hydration error, and this is the element that's not loading on the page
@samijaber @sidmohanty11
Steps To Reproduce: . Clone the following repo https://github.com/Manish-Builder-io/next-15-builder-app.git . Install the dependency and run the app, npm install && npm run dev . Visit the following content to observe the error https://builder.io/content/07e0555027df4e0c84c19f375916f171
Hello guys,
Any news on this topic?
Hello everyone,
I don't know if I can get a due date for this problem. We can't update the version and everything is there to reproduce :(
@samijaber @sidmohanty11
We've recently updated to the latest:
"@builder.io/react": "^8.0.9",
"@builder.io/sdk": "^6.0.4",
Finally, it works!
Marking this as closed given that it it resolved.
Let us know if you still face any issues
Hello it's not closed, still have the same issue
@MaximeGratens As we are currently unable to reproduce this issue, we would need a reproduction (in the form of a Custom Component whose <script> isn't loading) to be able to help you further
To reproduce:
- Download Manish's repo
- Add our builder public key: 1961e426a4c24256b0bf32de6a12ec6e
- Run npm install & npm run dev
- Navigate to http://localhost:3000/-with-visa
- Check the section (I added a picture of it)
- The script is not loading. Here is the content of the script:
<script>
if (typeof window !== 'undefined') {
const sectionCountries = document.querySelector('.section-countries')
const cardPortugal = document.querySelector('.card-portugal')
const cardItalia = document.querySelector('.card-italia')
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
cardPortugal.style.marginRight = '0'
cardPortugal.style.transform = 'none'
cardItalia.style.marginLeft = '0'
cardItalia.style.transform = 'none'
}
} )
}, {
threshold: 0.5,
});
observer.observe(sectionCountries);
}
</script>
You can check our homepage here to see the normal behavior.