const preact = require('preact'); const { connect } = require('preact-redux'); const addState = connect( function receiveState(state) { const { ws, animating, game, } = state; function sendGameReady() { document.activeElement.blur() return ws.sendGameReady(game.id); } return { game, animating, sendGameReady, }; }, ); function Controls(args) { const { game, animating, sendGameReady } = args; return ( ); } module.exports = addState(Controls);