JSX Syntax Enhancements and Features #84
thescientist13
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
Just an umbrella grouping of syntax specific features for JSX support coming out of #73 . They should be broken out into their own threads / issues and linked back to here, but that can be done over time.
Review Full JSX Feature Set
Should review the JSX Specification and see if there is anything else I'm missing or that would be a "show stopper"
https://facebook.github.io/jsx/
Coarse Grained Inferred Observability ✅
Tracked in
From this comment, seeing it all laid out, could be some real neat opportunities for some automatic observability when compiling down. At least the
observerAttributes
?Some thoughts
update
/patch
method vsthis.render()
?addTodo
doesn't also have to callthis.render()
?Loops
Be able to do something like this
Literal
This
EvaluationTracked In - #88
Support having something like this syntax
I think I was getting this error when I tried
Form Controls
Tracked In - #89
Boolean Attributes
Like a checked attribute
To my knowledge, JSX does not support this syntax
Form Submission
Would like be able to do something like this
Right now it works, but by accident I think, and seeing this error in the console
Fine Grained Inferred Observability 🚧
As a companion to #97, currently we just compile down to an
innerHTML
call and just callthis.render()
, like with an event handler. attributes.But obviously that blows everything away, so it would be nice to find something that could be a little more selective, a la like lit-html works. Tracked in #108
So this is interesting. Realized that although we were rendering JSX into a Shadow Root, I was not actually return the content into a declarative shadow root. So in the control group for example I had this
So when I "fixed" the render function to this
And then was getting this this error in the browser on load
So this could be an issue with continuously redeclaring the
<template>
tag when settinginnerHTML
? not sure if this would get fixed with more explicit / less naive reactivity model, but found some links that might be relevant - https://stackoverflow.com/questions/67932949/html-template-shadow-dom-not-rendering-within-handlebars-template .CSS
Being tracked in #136
From experience, JSX does not support
<style>
tags in JSX (need to link to a source) and so would like to align with #33 to figure out a way to get first party CSS support into custom elements in an SSR and platform compatible way, like with Declarative Shadow DOM.Destructured
this
ExpressionsSupport destructured
this
referencesBundling
How to best give JSX contents / metadata to consumers (URLs, compiled source, etc)? Currently we are returning the source and original URL as metadata.
Do we also need to do anything about the .jsx extension file inside source files? Or just example of how to use the
jsx-loader
as a transformer for any other system.Fragment
Being tracked in #137
JSX defines a "empty" tag to help with needing to always have a
render
function return a single parent elementDefinition Name as Tag
JSX supports using the the component class definition would enable something like this
Beta Was this translation helpful? Give feedback.
All reactions