How to can I get related posts according their tags?

hi,
I am Trying to find a way to get related post according to their category

    {post.tags && <RelatedPosts tags={post.tags} />} // passed all related tags to the component

and I am getting the tags in RelatedPosts component but don’t know how to get the post.

Hi @moh.meh41

Could you provide a link to a repo and a more detailed description of what you are trying to do.

Please see here for the kind of info that you can provide that will help others to help you.