mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-03-07 14:30:04 +01:00
``` <IFrameComponent> <SlateEditor {...props} /> </IFrameComponent> ``` Since react unmounts from top down, `IFrameComponent` will unmount first (destroying its window), then `SlateEditor` will unmount and attempt to access the iframe window (which no longer exists) throwing `Uncaught TypeError: Cannot read property 'document' of undefined`. It should be safe to skip removing event listeners from windows that no longer exist since they will be garbage collected upon destruction of the window anyway
This package contains the React-specific logic for Slate. It's separated further into a series of directories:
- Components — containing the React components for rendering Slate editors.
- Constants — containing a few private constants modules.
- Plugins — containing the React-specific plugins for Slate editors.
- Utils — containing a few private convenience modules.
Feel free to poke around in each of them to learn more!