useWindow()
Define and run window related commands.
Understanding useWindow() in Modularjs
What is useWindow()?
module.exports = ({ useWindow }) => {
const { /* your functions here */ } = useWindow();
// Your code here
};Example: Setting the Window Title
module.exports = ({ useEffect, useWindow }) => {
const { setTitle } = useWindow();
useEffect(() => {
setTitle('Testing again');
}, []);
};Available Functions (and More Coming Soon)
Last updated