Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing improper behavior when back button is pressed #986

Open
pkrakesh opened this issue Aug 8, 2022 · 0 comments
Open

Routing improper behavior when back button is pressed #986

pkrakesh opened this issue Aug 8, 2022 · 0 comments

Comments

@pkrakesh
Copy link

pkrakesh commented Aug 8, 2022

I am using found in my application like this:

const Router = createFarceRouter({
    historyProtocol: new BrowserProtocol(),
    historyMiddlewares: [queryMiddleware],
    routeConfig: makeRouteConfig(
        <Route path="/">

            <Route Component={App} />

            <Route path="/login">
                <Route Component={LoginPage} />
            </Route>

            <Route path="/signup">
                <Route Component={SignupPage} />
            </Route>

            <Route path="/home">
                <Route Component={HomeViewWrapper} />
                <Route path="add-source" Component={AddSourcePageContainer} />
            </Route>

        </Route>
    ),

It works correctly when pressing back and forward button for /login and /signup from / but, when pressing browser back button from /home/add-source page, the application exits instead of going back to /home. What is the correct implementation of the routing? Kindly help.

@pkrakesh pkrakesh changed the title Routing proper behavior when back button is pressed Routing improper behavior when back button is pressed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant