You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️this feature is strictly related to the data cascade proposal from #16 and probably should be implemented either together or after the data cascade is implemented.
xm should be able to render collections of data. For this I imagined we could use a <fill> tag with a new attribute called from (name can be changed).
from takes an array of flat objects (a string of JSON), iterates over them and repeats its content while filling the slots:
For advanced use cases from accepts:
glob patterns (grab fills from other HTML files)
JSON file paths
path to a JS module that exports an array or a function
path to a JS module that exports an async function
The async function version is super powerful 💣
async functions can be used to fetch data from an API, database and perform any other asynchronous operation!
The text was updated successfully, but these errors were encountered:
xm should be able to render collections of data. For this I imagined we could use a
<fill>
tag with a new attribute calledfrom
(name can be changed).from
takes an array of flat objects (a string of JSON), iterates over them and repeats its content while filling the slots:For advanced use cases
from
accepts:The async function version is super powerful 💣
async functions can be used to fetch data from an API, database and perform any other asynchronous operation!
The text was updated successfully, but these errors were encountered: