-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
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
frontend block is always empty #5
Comments
Any solution to the block being empty? |
The function run before the element is rendered to the DOM. Example: import ReactDOM from 'react-dom'
import App from './app
window.addEventListener('DOMContentLoaded', () => {
const rotateqDivElements = document.querySelectorAll('.rotateq-calc')
rotateqDivElements.forEach((element) => {
ReactDOM.render(<App />, element)
})
}) @LearnWebCode Could you confirm it and change it in your code please? |
@Geraldf @davulrich's observation is correct. You need to wait for the DOM to load all the elements. |
I tried to use it, but it looks like that the component in frontend.js (OurComponent) never gets rendered in this repo.
in the index.js the save function returns nothing
save: function () { return null }
which would explain why the block in the frontend is empty.
The text was updated successfully, but these errors were encountered: