express-react-views
vhtml
Our great sponsors
express-react-views | vhtml | |
---|---|---|
3 | 3 | |
2,745 | 759 | |
- | - | |
1.8 | 0.0 | |
about 2 years ago | 4 months ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
express-react-views
-
Using express router and nunjucks, or separate app with Vue/React?
It's possible to create a view engine in express that ties back to server-side rendering of react/vue but I'm not sure how well that would work in practice. Actually there is this library that does it for react -- https://github.com/reactjs/express-react-views -- but it's read-only and they rightly point at nextjs & remix as alternatives.
- Is it possible to use React as a template engine?
- Menggunakan JSX sebagai view engine Express.js
vhtml
-
What are the most popular view engines for express.js today?
I just wonder if there's a significant performance impact, but as you said preact or even something simpler that supports JSX, like https://github.com/developit/vhtml could be used to speed it up
-
Is there a way to make this JavaScript code more concise and less repetitive?
Frameworks definitely help solve this problem in part. But you don't need to go that far just for something simple like this. For example you could use htm plus vhtml to get a no-build tools way to write declarative HTML markup that is translated into a plain HTML string. Or for just a few more kb, you can use htm + preact to get all of the power of React for about 13kb, again with no build tools or setup.
-
Menggunakan JSX sebagai view engine Express.js
Ada satu library bagus yang mengubah jsx element menjadi plain html string yang bisa dipakai sebagai dasar untuk percobaan membuat view engine expressjs. Yaitu vhtml yang dibuat oleh creator preact.
What are some alternatives?
EJS - Embedded JavaScript templates -- http://ejs.co
hyperscript - Create HyperText with JavaScript. [Moved to: https://github.com/hyperhype/hyperscript]
Jade - Pug – robust, elegant, feature rich template engine for Node.js
preact-habitat - Zero configuration Preact widgets renderer in any host DOM
nunjucks - A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
solid - A declarative, efficient, and flexible JavaScript library for building user interfaces. [Moved to: https://github.com/solidui/solid]
handlebars.js - Minimal templating on steroids.
kReact - Let's learn React by building react within 100 lines of code
marko - A declarative, HTML-based language that makes building web apps fun
Preact - ⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
linaria - Zero-runtime CSS in JS library
express-jsx