please forgive me if there is a duplicate.
I know that MemoryRouter has initialEntries and initialIndex, so you can set the path, etc. for "location" and "history". However, “match” is not updated ... I need to install “match” for my Jest application applications and tests.
When i try
<MemoryRouter initialEntries={['/hello']} initialIndex={0}>
<Hello store={store} />
</MemoryRouter>
I get
match: { path: '/', url: '/', params: {} ... },
location: { path: '/hello', pathname: '/', ... },
history: { ..., location: { path: '/hello', pathname: '/', ... }}
I wonder if there is a way to establish a match. Thanks in advance.
source
share