Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
968 Näkymät

Can anyone tell me how the JS function renderToElement works? 

import { renderToElement } from "@web/core/utils/render";

What does it do and how can I use it? 


My case:

I have a JS file that requests data from the database and I want to render this data on the website.

The respons is a JSON object with all the required fields. 

But how can I render the appropriate html (front-end)?

I found the function renderToElement, but I have no idea how it works.


Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
maalisk. 25
684
0
marrask. 24
1326
1
syysk. 24
1426
0
marrask. 21
3190
1
tammik. 19
9304