10up / headstartwp

Build a headless website fast with WordPress, the world’s most popular CMS, and Next.js, the most popular React framework. A free and open source solution by the experts at 10up.
https://headstartwp.10up.com
153 stars 17 forks source link

When using getServerSideProps with addHookData the page loses the usePost info #774

Open Knskan3 opened 2 months ago

Knskan3 commented 2 months ago

Describe the bug

When using getServerSideProps with addHookData the page loses the usePost info

Steps to Reproduce

Context:

Screenshot 2024-05-21 at 07 47 05

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

nicholasio commented 1 month ago

When you say "the page loses the usePost info" do you mean you are not able to use usePost hook?

By design you should not be able to access the post data directly from props but only from the hooks.