Hacker News new | ask | show | jobs
by dsego 1406 days ago
Which looks nicer? Eta vs JSX

   <%~ includeFile('./navbar', { pages: [
     'home',
     'about',
     'users'
   ] }) %>

   <navbar pages={['home', 'about', 'users']} />


> would just be JavaScript functions that take props and return some JSX

They can also be async functions that process data independently. Whereas templates are commonly just passed in data from the controller.

https://github.com/dsego/ssr-playground/#jsx-partials