53 Replies
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
1.5 hours before work I can at least see how crazy this is
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
right! "all jsx is" is a render engine just like handlebars.
Calego
CalegoOP4y ago
Nano JSX • Lightweight 1kB JSX library
Designed to build ultra fast Multi-Page Apps (MPAs), using isomorphic JavaScript. Written in TypeScript. Server Side first with partial hydration. Perfect for your next PWA. As small as svelte.
Calego
CalegoOP4y ago
mmm... is this what i'm looking for?
Calego
CalegoOP4y ago
GitHub
GitHub - loreanvictor/render-jsx: Tools for building JSX-based libr...
Tools for building JSX-based libraries / frameworks, also a super-thin and fast pure DOM renderer. - GitHub - loreanvictor/render-jsx: Tools for building JSX-based libraries / frameworks, also a su...
Calego
CalegoOP4y ago
this maybe
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
I'd look to provide a replacement for "renderTemplate" or maybe not a replacement but like "renderJsx" and then some way to extend Application with ApplicationJSX yeah
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
is React's JSX really baked in? they don't have a library for this??
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
link me, i'm failing to find react-jsx
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
oh what's preact and is that the answer to all our woes?
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
oh standard JSX is ... transpiled into hyperscript? wtf ugh
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
alright we tryin nanoJSX
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
GitHub
GitHub - hyperhype/hyperscript: Create HyperText with JavaScript.
Create HyperText with JavaScript. Contribute to hyperhype/hyperscript development by creating an account on GitHub.
Calego
CalegoOP4y ago
I might vomit
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
var h = require('hyperscript')
h('div#page',
h('div#header',
h('h1.classy', 'h', { style: {'background-color': '#22f'} })),
h('div#menu', { style: {'background-color': '#2f2'} },
h('ul',
h('li', 'one'),
h('li', 'two'),
h('li', 'three'))),
h('h2', 'content title', { style: {'background-color': '#f22'} }),
h('p',
"so it's just like a templating engine,\n",
"but easy to use inline with javascript\n"),
h('p',
"the intention is for this to be used to create\n",
"reusable, interactive html widgets. "))
var h = require('hyperscript')
h('div#page',
h('div#header',
h('h1.classy', 'h', { style: {'background-color': '#22f'} })),
h('div#menu', { style: {'background-color': '#2f2'} },
h('ul',
h('li', 'one'),
h('li', 'two'),
h('li', 'three'))),
h('h2', 'content title', { style: {'background-color': '#f22'} }),
h('p',
"so it's just like a templating engine,\n",
"but easy to use inline with javascript\n"),
h('p',
"the intention is for this to be used to create\n",
"reusable, interactive html widgets. "))
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
yes
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
very yes
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
was nano the lib you remember seeing?
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
but hyperscript doesn't do jsx out of the box does it?
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
gotchya, and that's what I want to avoid
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
https://github.com/loreanvictor/render-jsx Another option, looks lighter than nano
GitHub
GitHub - loreanvictor/render-jsx: Tools for building JSX-based libr...
Tools for building JSX-based libraries / frameworks, also a super-thin and fast pure DOM renderer. - GitHub - loreanvictor/render-jsx: Tools for building JSX-based libraries / frameworks, also a su...
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
correct
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
the build step feels extra, this 'should' be as simple as "take string of jsx, parse on the fly, render" ala handlebars like surely someone has a library for that
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
right, 'string of jsx' probably not the right words
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
aaaaahhhhhhh (╯°□°)╯︵ ┻━┻
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
lol i just found this
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
basically es template string things
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
Proof of concept, this worked great ironically it needs a build step to bundle in the npm facepalmpicard I think next step here would be to make a library module make some utilities like JsxApplication, renderJsx, etc. to wrap this to the trello !
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server