Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi, I work on Plasmic. If not React, how would you encode composition, state, and behavior?


I wouldn't. A huge amount of interactivity can be done in pure CSS, and often design work is exploratory or experimental and doesn't need to output a fully functional component, it just needs the functionality CSS and HTML provide like interactive inputs and focus states.

Once you get the basic design abilities down, you can behind the scenes setup logic using some framework (sure you can use React, but I think tying a tool to a framework like that is a bad idea, React won't last forever and hopefully will die soon in place of newer better frameworks) that doesn't actually impact the basic HTML/CSS that is output.

Devs will still be needed to hook up designs to code logic, but at least give designers the ability to give devs clean HTML/CSS for them to wire up into JSX or Vue templates or whatever because currently many front-end devs are absolutely shit at HTML and CSS and React encourages lots of bad practices with HTML and CSS.


Some sort of open AST. Honestly "HTML" is pretty close except string typed attribute. `data-`|dataset is also pretty close.

> Some sort of open AST

well React is kind of that but it's not serializable. The "React Server Components" is trying.

---

We just need HTML but in form of AST so that it is serializable and programmable.


I don't follow how HTML comes anything close to expressing dynamism, composition, state, Turing completeness, etc.

Sure, you can encode whatever you want inside of data attributes, but that's just ignoring the problem. You still have to decide on a language to express all that within your data attributes.

React server components also does not is not trying to serialize this. Quite the opposite. We have an in-depth write up here: https://www.plasmic.app/blog/how-react-server-components-wor...

(Sise note: Plasmic's AST is in the open and has an API.)


I did a quick dig on Plasmic's AST and not found its spec. Is there a repo for its specification?


> 2. Server serializes root component element to JSON

That's what I'm talking about.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: