Difference between revisions of "Loop"
From SocialStack
(Created page with "<Loop> is a very commonly used [https://reactjs.org/docs/react-component.html React component] installed by default in SocialStack projects. It is used to loop over lists of i...") |
|||
| Line 2: | Line 2: | ||
=Sample Usage= | =Sample Usage= | ||
<syntaxhighlight lang="dart" line="1"> | |||
<Loop over='page/list' filter={ | |||
{ | |||
where: { | |||
url: { | |||
startsWith: '/en-admin/' | |||
} | |||
} | |||
} | |||
}> | |||
{ | |||
page => { | |||
return page.title; | |||
} | |||
} | |||
</Loop> | |||
</syntaxhighlight> | |||
Revision as of 13:59, 9 November 2021
<Loop> is a very commonly used React component installed by default in SocialStack projects. It is used to loop over lists of items typically from the API.
Sample Usage
<Loop over='page/list' filter={
{
where: {
url: {
startsWith: '/en-admin/'
}
}
}
}>
{
page => {
return page.title;
}
}
</Loop>