Ethan Brown

Mark an answer as accepted in client-only Q&A demo?

asked by Ethan Brown
nextjs
prototype

I'm prototyping a Q&A page without a backend. How can I mark one answer as the accepted solution?

Answers

Olivia Chen
Olivia Chen

Keep an acceptedAnswerId in component state. Update on click.

Noah Wilson
Noah Wilson

Derive it from URL search params if you want it to be shareable.