I don’t understand the process of updating the UI after submitting an answer / a comment

I have a server component that gets the initialAnswers, then it is sent through props in a client component that has an infinite scroll:

Page
├── AnswerForm (client comp)
│
└── AllAnswers (server comp)
    ├── getAnswers - server action (answers)
    ├── display totalAnswers
    └── AllAnswersInfiniteScroll initialAnswers={answers}
        └── Votes (client comp)

If I render the answers in a server component, I can get the the update with a revalidatePath() in the server action, but it does not work in the client component.

So my question is, how do I get the client component to behave like a revalidatePath() in a server component?

Relevant bits of code:

The AllAnswers server component:

const AllAnswers = async ({ questionId, userId, totalAnswers, page, filter }: Props) => {
  const { answers, isNext } = await getAnswers({
    questionId,
    page: page ? +page : 1,
    sortBy: filter,
  });

  return (
    <div className='mt-11'>
      <div className='flex items-center justify-between'>
        <h3 className='primary-text-gradient'>{`${totalAnswers} ${totalAnswers === 1 ? 'Answer' : 'Answers'}`}</h3>

        <Filter filters={AnswerFilters} />
      </div>

      <AllAnswersInfiniteScroll
        initialAnswers={answers}
        questionId={questionId}
        userId={userId}
        isNext={isNext}
        filter={filter}
      />
    </div>
  );
}; 

The AllAnswersInifiteScroll client component:

const AllAnswersInfiniteScroll = ({
  initialAnswers,
  questionId,
  userId,
  filter,
  isNext,
}: Props) => {
  const [allAnswers, setAllAnswers] = useState(initialAnswers);
  const [isNextPage, setIsNextPage] = useState(isNext);

  const pageRef = useRef(1);

  const [ref, inView] = useInView();

  const loadMoreAnswers = async () => {
    const next = pageRef.current + 1;

    const { answers: newAnswers, isNext } = await getAnswers({
      questionId,
      page: next,
      sortBy: filter,
    });

    if (allAnswers?.length) {
      setAllAnswers((prevAnswers) => [...prevAnswers, ...newAnswers]);
      setIsNextPage(isNext);
      pageRef.current = next;
    }
  };

  const filterAnswers = async () => {
    pageRef.current = 1;

    const { answers: newAnswers, isNext } = await getAnswers({
      questionId,
      page: pageRef.current,
      sortBy: filter,
    });

    setAllAnswers(newAnswers);
    setIsNextPage(isNext);
  };

  useEffect(() => {
    if (inView) {
      loadMoreAnswers();
    }
  }, [inView]);

  useEffect(() => {
    filterAnswers();
  }, [filter]);

  return (
    <>
        //Here I map the answers and display them.
        // In here I also have a Votes (client component)
    </>

This is what confuses me, and can’t make it work with the votes / likes either:
The Votes and AnswerForm are both client components.

If I display the answers in the AllAnswers server component, I vote / like an answer -> it calls a server action that has revalidatepath() -> my vote / like answer is updated without me having to refresh the page.

But If I vote / like an answer, or I add a comment that is displayed after in a client component, revalidatePath() does not work? So then how do I make it behave “properly”?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật