Debugging process on morse display clear on keytype switch

This commit is contained in:
Gene Mecija 2020-01-17 01:29:24 -08:00
parent a46ce4fd3f
commit c777cf013c
13 changed files with 94 additions and 108 deletions

View file

@ -4,10 +4,10 @@ const KeyTypeContext = React.createContext()
class KeyTypeContextProvider extends Component {
state = {
keyType: "straight"
keyType: "electronic"
}
switchKeyType = (type = "straight") => {
switchKeyType = (type) => {
this.setState({keyType: type})
}

View file

@ -8,10 +8,10 @@ function MorseBufferContextProvider(props) {
// morseWords: []
// //morseCharBuffer, morseWords, clearHistory, setMorseCharBuffer, setMorseWords
// }
console.log('MorseBufferContextProvider LOADED');
const [morseCharBuffer, setMorseCharBuffer] = useState('')
const [morseWords, setMorseWords] = useState([])
// switchKeyType = (type = "straight") => {
// this.setState({keyType: type})