Hacker News new | past | comments | ask | show | jobs | submit login

That's nothing, there's also implicit boundaries across which NextJS will convert your objects to JSON, and NOT CONVERT THEM BACK AFTER, while pretending there's no change. Have a date in your object? Not any more pal, it's a string. You return an instance with methods in it? Wanna bet? How about a Map or Set? Guess what? Nah.



Which boundaries are these? I’ve not hit them. But then I don’t use the api features.


getInitialProps and the various slightly-differently-worded replacements thereof. Anything returned from there must be transparently JSONable or you're gonna have a bad time. And there's no way to enforce this other than warning comments and code review, so it gets violated all the time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: