May 2019
Intermediate to advanced
496 pages
10h 38m
English
All that's left is to call the request action when required. We'll do this for ScriptName, but you could also do it for the buttons in the menu bar:
it('dispatches a prompt focus request', () => { return expectRedux(store) .toDispatchAnAction() .matching({ type: 'PROMPT_FOCUS_REQUEST' });});
const mapDispatchToProps = { submitScriptName: text => ({ type: 'SUBMIT_SCRIPT_NAME', text }), promptFocusRequest: () => ({ type: 'PROMPT_FOCUS_REQUEST' })};export const ScriptName = connect( mapStateToProps, ...Read now
Unlock full access