schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs and SSR.
https://jasprpad.schultek.de
MIT License
996 stars 59 forks source link

docs(jaspr_router): Make it clear what type of data can be passed to the `extra` parameter #240

Open Maksimka101 opened 1 month ago

Maksimka101 commented 1 month ago

I've tried to push a route with a non primitive data in the extra parameter and got the error UnimplementedError: structured clone of other type. I figured out that Router.push method is using the window.history.pushState method and passes my model there which leads to the error above

It would be nice to mention that the extra parameter has some restrictions

Ps. I've fixed the error by serializing my model to json string and passing this string to the extra parameter