You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{render,h,options,Fragment}from"preact"importrenderToStringfrom"preact-render-to-string"constoldDiff=options.__b;options.__b=(vnode)=>{if(vnode.type===Fragment){console.log(vnode.type===Fragment ? vnode.props:null)}if(oldDiff)oldDiff(vnode)}functionApp(){return<div><h1>test</h1>{[<pkey="1">1</p>,<pkey="2">2</p>,<pkey="3">3</p>,]}</div>}constapp=document.getElementById("app");render(<App/>,app)console.log("=====")// Fragments not visible in options._diff with RTSrenderToString(<App/>);
The text was updated successfully, but these errors were encountered:
Hmmm, most likely because we do this different compared to Preact diffing, in RTS we just go over the Array, child by child while in Preact we stub in a new element
Yeah, admittedly my use case is pretty esoteric. I doubt the current behavior leads to problems. Need to put some more thought into it, as there might be a way to work around it.
The text was updated successfully, but these errors were encountered: