Gutenberg block – Save PHP function’s output as HTML?
I am new to creating blocks in the editor but have practiced with a couple tuts. I have been able to create a block that is able to use ServerSideRender, but after reading am I correct to think it is rendered on the frontend?
I am wondering if there is a way to create a block, call a php function, return a html output, and save the block as html output. So it does not have to render the php function each time the block is called.
Am I suppose to use REST or can you use Ajax some how?
The reason is because there is a custom table in the database that I would like to get information from and put it into the block, but I would rather not call the table multiple times in the frontend.