question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception on resettableAppReducer(state, action)

See original GitHub issue

The code of resettableAppReducer is

const resettableAppReducer = (state, action) =>
      appReducer(action.type !== USER_LOGOUT ? state : undefined, action)

So if action.type === USER_LOGOUT

appReducer( undefined, action) is call

Unfortunatly, appReducer is a redux reducer, it check its first argument in a switch

export default (previousState, { type, payload }) => {
    switch (type) {
}

An exception is throw

Will be better to write something like that:

        if (action.type !== USER_LOGOUT)
            return appReducer(state, action)
        else
            return state
    }```

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
JacquesBonetcommented, Jul 29, 2018

I’m on master.

I make a new git clone on master.

Now I have good code for list/index.js.

import { combineReducers } from 'redux'
import ids from './ids'
import params from './params'
import selectedIds from './selectedIds'
import total from './total'

export default combineReducers({
    ids,
    params,
    selectedIds,
    total,
})

Others files didn’t change

Don’t understand why I get code of next branch for this file, and only for this file.

All its fine now.

Thks a lot djhi

0reactions
djhicommented, Jul 29, 2018

master has not been backported to next yet but it will soon

Read more comments on GitHub >

github_iconTop Results From Across the Web

State Action Requirement | Wex - Law.Cornell.Edu
This requirement only applies when the law in question requires the government to have acted. This state action requirement extends to a number...
Read more >
Supreme Court of the United States - Columbus School of Law
Three exceptions to the state action doctrine are the public function exception, entanglement exception, and the entwinement exception.
Read more >
The State Action Doctrine for Federal Constitutional Claims
The Bill of Rights in the U.S. Constitution, as a general rule, only regulates and restricts government action. It does not cover private...
Read more >
JavaScript redux-saga Examples - HotExamples
toJS() : state, actionTransformer: action => (action.payload && action.payload. ... const store = createStore( resettableAppReducer, initialState, ...
Read more >
State Action and the First Amendment - UMKC School of Law
Free Speech and the State Action Requirement The issue: Does the ... Yet, almost every rule has its exceptions, and this rule is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found