In this app, we want to make the orange box ‘pannable’. It has event handlers for the , panmove and panend events, but these aren’t native DOM events. We have to dispatch them ourselves. First, import the pannable function…

    Open the file. Like transition functions, an action function receives a node and some optional parameters, and returns an action object. That object can have a destroy function, which is called when the element is unmounted.

    Update the function and try moving the box around.