Skip to content

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

Open
@juyeong-s

Description

@juyeong-s

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions