2
the documentation에 따르면 LOCATION_CHANGE
이벤트를 호출하려면 push('/with/the/path')
을 호출해야합니다. 문서에서 예제 :react-router-redux에 대해 LOCATION_CHANGE 이벤트를 발생시키는 방법은 무엇입니까?
어떻게 생각 :
import { routerMiddleware, push } from 'react-router-redux'
// Apply the middleware to the store
const middleware = routerMiddleware(browserHistory)
const store = createStore(
reducers,
applyMiddleware(middleware)
)
// Dispatch from anywhere like normal.
store.dispatch(push('/foo'))
그러나, 이것은 내가 (그것은 아무것도처럼 보이지 않는)이납니다 푸시 호출 할 때처럼 보인다 있어야 할 곳에 없는?
'푸시 (push)'헬퍼 메소드는이 목적을 위해 정확하게 사용됩니다. 수동으로 실행하려는 유스 케이스는 무엇입니까? 푸시 메소드로 포장 된 내부 구조가있을 수 있습니다. 그렇지 않으면 호출 할 수 없습니다. –
'syncHistoryWithStore' 했습니까? – xiaofan2406
@MarioTacke 앱의 다른 부분으로 리디렉션하려고합니다. (예 : '/ 프로필') – drewwyatt