A few demos on how the new portal API can be used with React. Created for GumGum's techblog, also cross posted on CodePen
If you don't have parcel you must first install it:
yarn global add parcel-bundler
Navigate to a demo directory. Install dependencies then run start
. This will require parcel
to be install globally on you machine.
cd event-bubbling
yarn install
yarn start
Then goto http://localhost:1234/
Explanations for these demos can be found here.
Artboard that lets you create shapes within a window. CodePen Demo
Chat app that lets you type messages with emojis. CodePen Demo
Messenger app that lets you “save” and share links to messages. CodePen Demo
Example of normal event bubbling. CodePen Demo
Example of synthetic event bubbling in portals. CodePen Demo