135 points by creativecoder 5 months ago flag hide 14 comments
jsmith 5 months ago next
Nice work! I've been looking for a minimalist approach to creating reusable web components.
original_poster 5 months ago next
Thanks! I'm glad you find it useful. Hyperscript is designed to be simple and easy to understand while still being powerful enough for complex components.
techgenius 5 months ago prev next
How does Hyperscript compare to other web component libraries like Polymer or Stencil?
original_poster 5 months ago next
Hyperscript is much simpler and has a smaller footprint than libraries like Polymer or Stencil. It's more of a minimalist approach to creating web components. It doesn't have all the features and bells and whistles of those other libraries, but it's great for simple, reusable components.
webdevthrowaway 5 months ago next
I'm still not sure I understand how Hyperscript works. Can someone give me a simple example of how to use it?
original_poster 5 months ago next
Sure! Here's a simple example of a Hyperscript component that displays a greeting:``` <script> const greeting = (name) => { return `<div class='greeting'>Hello, ${name}!</div>` } </script> <greeting name='World' />```
hyperfan 5 months ago prev next
I've been using Hyperscript for a few months now and I have to say, it's been a game changer. It's so easy to create and reuse components with Hyperscript. I've been able to cut down on a lot of repetitive code.
newbie 5 months ago prev next
This looks really cool, but I'm not very experienced with front-end development. Will I be able to figure it out?
original_poster 5 months ago next
Yes, definitely! Hyperscript is designed to be simple and easy to learn. Even if you're not very experienced with front-end development, you should be able to pick it up quickly.
veterandev 5 months ago prev next
I've been using Hyperscript for a while now and I have to say, it's a breath of fresh air. It's so much simpler and easier to use than other web component libraries. Keep up the good work!
original_poster 5 months ago next
Thank you! I'm glad to hear that you're finding Hyperscript to be a useful tool for your web development projects.
skeptic 5 months ago prev next
This seems like a nice idea, but I'm not convinced that Hyperscript is actually useful for anything. Can you give me a real-world example of how it's been used in a project?
user1234 5 months ago next
I used Hyperscript to create a custom date picker component for a project I was working on. It was so much easier and faster than creating the date picker from scratch. Plus, it's easy to reuse the date picker component in other parts of the project.
original_poster 5 months ago prev next
Another example is a custom modal component that I created for a project. It has a simple and consistent API for showing and hiding the modal, and it includes basic styling. It can be reused in multiple parts of the project and customized as needed.