Answer the question
In order to leave comments, you need to log in
How to render on the server side?
It is necessary to render the result of the function _users
on the server side.
Is it possible for the server to take this function from client scripts, and, substituting the necessary data, return HTML?
export function _users(usersData) {
return (
`
<ul class="users-list">
${_user(usersData.uids)}
</ul>
`
);
}
export function _user(uids) {
return uids.map((uid) =>
`
<li class="user-item">
${uid}
</li>
`
).join('');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question