How to pass aditional argumetns to ServerSideRender?
-
The component ServerSideRender can only handle block name and attributes, but how can I send more information to the function that will render the content, some idea?
I don’t want to put information on props.attributes because the editor will save this content on the tag <!– block/name { atributes } /–> and those information don’t need to be stored.
el(ServerSideRender, { block: props.name, attributes: props.attributes })My first thought was to use a temporary attribute like
props.setAttributes({ tmp: [arg1, arg2] })but I can’t create an attribute to be an array, i triedtype: 'array'and it crashes the block render.
The topic ‘How to pass aditional argumetns to ServerSideRender?’ is closed to new replies.