Replies: 1 comment 5 replies
-
In the As for the init behavior, you can return a initial decoration list in |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm creating a small widget that adds presentations from google slides when the link comes from google docs.
It reads all the links and filters for those that have the text
docs.google.com/presentatio
in the href attribute, then adds theLinkWidget
component to its last position and it all works fine.Unfortunately, I have a problem, because at the beginning of rendering, the
apply
method does not fire, so it will not renderLinkWidget
..In addition, every time the text changes, the component is remounted. How to make a cache of widgets whose links have not changed (let's say I check if the href attribute hasn't changed, if not, you don't need to mount the widget again)? As this one is not enough ( because position has changed )
Small demo:
https://codesandbox.io/s/smoosh-sunset-ey4uhy?file=/src/useGoogleSlidesPlugin.tsx
Beta Was this translation helpful? Give feedback.
All reactions