Chapter 76: useCurrentScale()
Core Idea
With this hook, you can retrieve the scale factor of the canvas. Useful for if you want to measure DOM nodes.
Key Concepts
Code Examples
const MyVideo = () => {
const scale = useCurrentScale();
return <div>The current scale is {scale}</div>;
};
- What it demonstrates: Usage pattern for useCurrentScale() from the official docs.
Key Takeaways
- Understand compatibility when working with useCurrentScale().
- Understand see also when working with useCurrentScale().
Connects To
- Cancel Render: related page in the Hooks & Data APIs section.
- Continue Render: related page in the Hooks & Data APIs section.
- Data Fetching: related page in the Hooks & Data APIs section.