-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello! This is really neat!
I see the custom renderer does this:
Lines 5 to 7 in 7852fdc
| export function render( Component ){ | |
| writeFileSync( './resources/index.gui', ReactDOMServer.renderToStaticMarkup( <Component /> ) ); | |
| } |
What are the downsides?
- How much slower is it to create UI dynamically by writing it to a file?
- Does this mean React component can not use features like
useReforcreateRefto reference elements?
I do see the upsides though! This is definitely a nice way to compose markup, even if the dynamic element reference ability is missing.
I wonder: maybe there's an additional way we can "hydrate" the components, so that after they are loaded, document querying APIs could be used in order to make useRef or createRef work?
Metadata
Metadata
Assignees
Labels
No labels