Skip to content

Instantly share code, notes, and snippets.

@zheksoon
zheksoon / libui-react-like-syntax-proposal.c
Last active March 20, 2018 08:07
Pure C-complaint React-like syntax proposal for libui for building dynamic native user interfaces in reactive manner
// Pure C-complaint React-like syntax proposal for libui for building dynamic native
// user interfaces in reactive manner.
// "h" function is vararg function that returns itself, so it's possible to chain calls
// without need to write "h" again and again, only in cases you need to break the chain
// with semicolon.
// As its first parameter "h" takes component function pointer of the next definition:
// void Component(uiConstructor h, ...)
// and then list of key-value pairs a-la props in React.js land. The props list must end