First of all, thank you for all the deep thinking and work you have put into Slate.
We are wanting to take SlateJS a bit farther — into the Inferno JS community. We are happy to do the work to create a pull request to the project, but we've become stuck trying to isolate the problem that prevents the Leaf from being rendered.
To that end, we have pulled together a bare-bones comparison project to help troubleshoot what is different between Slate on React and Slate on Inferno. We've made an extended effort to strip complexity like Babel and JSX out of the mix so there is less magic happening. Webpack is present to perform compile time module substitution of React to Inferno-Compat.
shanewholloway/inferno-slate-compat
Can you help kickstart us again? If you could describe how the leaf nodes are supposed to rendered into the DOM, we could follow that trail, work with the Inferno-Compat folks, and develop it into a pull request for either Inferno or for Slate as appropriate. Once working, will also want to contribute a test to back to the Slate project so it keeps working with Inferno as things progress.
Hey @shanewholloway, sounds cool!
Here's where the <Leaf> component is rendered: https://github.com/ianstormtaylor/slate/blob/master/src/components/node.js#L320-L369 I'm not sure what's going on that would make that code path not hit by Inferno though. Feel free to ask followups!
Your reference concurred with what I found via DevTools.
Taking another look at the mystery, I took a different debugging tack and discovered that when I change leaves from an Immutable List into a vanilla JS Array, the bare-bones project works fine with Inferno. It looks like Inferno-Compat doesn't (yet) support iterables as children.
Now I know where to submit a patch! Thanks for the support. I'll update this thread when I post the PR to the Inferno project.
@shanewholloway I'm guessing there will be other problems you run into when you get Slate rendering and firing events, because as far as I know it relies on React's event system for lots of the contenteditable-specific events (like onSelect, onChange, etc. for contenteditable elements).
Inferno PR 899 submitted.
I can confirm your predictions on event compatibility; there are certainly differences. At least the rendering now works! We'll keep digging in to see if the events can be adapted.
Update: The Inferno PR was accepted and merged in. Basic rendering should work with Inferno starting after inferno ^1.3.0-rc.9.
Closing since the blockers were solved.