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
Good question. My first guess would be to create a <canvas> in React, and then simply reference it in Pt.
React:
render(){return(<canvasid="hello"></canvas>)}
Then to instantiate Pt by referencing the id:
newCanvasSpace("#hello").setup(...);
Use the latest v0.2 version. This won't work in Pt v0.1 because of a constructor bug.
Probably you'll need to clean up the Pt instance in React's componentWillUnmount() (or something like that), so that it won't try to draw to an element that no longer exists.
Hope this will work. If not, we'll fix it. 💪 Cheers!
For example, when I use Pt with React I should be able to destroy the Canvas Instance when the component leave.
The text was updated successfully, but these errors were encountered: