-1
大文字と小文字などのチェック文字列が必要です.iすべての偽の初期状態があり、状態を更新するには値の入力に依存します。私は更新された状態で症例の終わりに状態を戻したい。還元状態を1つずつ更新して最後の状態に戻すにはどうすればよいですか?
const INITIAL_STATE = {lowercaseStatus:false,upperCaseEditStatus:false,allStatus:false}
export default (state = INITIAL_STATE, action) => {
switch (action.type)
{
case INPUT:
If(uppercase(action.payload.value))
{
Update upperCaseEditStatus to true
}
If(lowerCase(action.payload.value))
{
Update lowercaseStatus to true
}
If(other condition)
{
Upates props depends on corresponding condition
}
retrun state;
}
この機能を実現する方法を教えてください。