mobeigi / mobeigi.com

Source code for the mobeigi.com website.
https://mobeigi.com
9 stars 1 forks source link

Remove url resolvers as server actions #209

Open mobeigi opened 2 hours ago

mobeigi commented 2 hours ago

The async url resolvers are current server actions.

This is because the link node type ReactNode resolver relies on these functions for internal links. The resolvers are server side because they need to fetch a doc to populate doc relationships that might not be there (due to Payload using depth 0 by default).

Finally, CommentSection, a client side component uses serializeLexical which is fully client side except for the link node which is the only async server side resolver.

Some solution ideas:

mobeigi commented 2 hours ago

Discussion on Payload Discord help thread: https://discord.com/channels/967097582721572934/1300047914566942741/1300047914566942741