Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize the tweet to avoid client error #154

Open
Dhravya opened this issue Dec 25, 2023 · 0 comments
Open

Serialize the tweet to avoid client error #154

Dhravya opened this issue Dec 25, 2023 · 0 comments

Comments

@Dhravya
Copy link

Dhravya commented Dec 25, 2023

I'm encountering this error


Warning: Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.

{: {lang: "en", reply_count: 9, retweet_count: ..., favorite_count: ..., possibly_sensitive: ..., created_at: ..., display_text_range: ..., entities: ..., id_str: ..., text: ..., user: ..., edit_control: ..., card: ..., isEdited: ..., isStaleEdit: ...}}

A simple fix would be to serialize the tweet like

data={JSON.parse(JSON.stringify(unit))}

and then showing it, in server components?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant