import { atom , selector } from 'recoil' ; import { MIDIParams } from '../../MIDIParams' ; export const midiLearningState = atom < string | null > ( { key : 'midiLearningState' , default : null } ) ; export const midiIsLearningXFaderState = selector ( { key : 'midiIsLearningXFaderState' , get : ( { get } ) => { const learning = get ( midiLearningState ) ; return learning === MIDIParams . XFader ; } } ) ;