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

[Bug]: After executing history.push, I executed history.back, but the value of the funnel does not change. #96

Open
juyeong-s opened this issue Dec 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@juyeong-s
Copy link

juyeong-s commented Dec 28, 2024

Package Scope

@use-funnel/react-navigation-native

Bug description

After executing history.push, I executed history.back, but the value of the funnel does not change.

In the code below, after pushing to '추가정보입력', I pressed the back button. I confirmed that Pressable's onPress was called, and then funnel.history.back(); would have been called. However, the funnel's value still has the '추가정보입력' value.

What did I do wrong?

const funnel = useFunnel<{
    기본정보입력: {};
    추가정보입력: {};
    가입완료: {};
  }>({
    id: 'sign-up-funnel',
    initial: {
      step: '기본정보입력',
      context: {},
    },
  });
  
  <funnel.Render
        기본정보입력={() => {
          return (
            <BaseInfoFunnel
              onNext={() => {
                funnel.history.push('추가정보입력');
              }}
            />
          );
        }}
        추가정보입력={() => {
          return (
            <AdditionalFunnel
              onNext={() => {
                funnel.history.push('가입완료');
              }}
            />
          );
        }}
        가입완료={() => {
          return <CompletedFunnel />;
        }}
      />

Expected behavior

No response

To Reproduce

No response

Possible Solution

No response

etc.

No response

@juyeong-s juyeong-s added the bug Something isn't working label Dec 28, 2024
@juyeong-s juyeong-s changed the title [Bug]:After executing history.push, I executed history.back, but the value of the funnel does not change. [Bug]: After executing history.push, I executed history.back, but the value of the funnel does not change. Dec 28, 2024
@minuukang
Copy link
Member

Based on this example, I can't guess what's causing it or what you want. Can you post an example repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants