March 18, 2025

Evergine React Template Upgrades and Custom Serialization Support

We are excited to share two important updates for Evergine developers: a new serialization converters library and improvements to the React web template. These changes make it easier to handle data between JavaScript and C#, speed up development, and offer better control over the Evergine canvas.

New serialization converters library

We have introduced a new Evergine.Serialization.Converters library to simplify data exchange between JavaScript and C# in WebAssembly (WASM) projects. This library includes default JSON converters for many structs in Evergine.Mathematics and Evergine.Common. It allows these types to be easily serialized and deserialized when interacting with JavaScript.

Key features:

  • Automatic integration: In new Evergine web projects, this package is included by default.
  • Manual update: For existing projects, you can add the package manually editing C# project file.
  • Flexible customization: You can remove the default converters and add your own, making it easy to adapt to your application needs.
  • Global availability: Once a converter is added, it is available across your entire application. You can also use these converters for method parameters when interacting between JavaScript and C#.

The library works not only for web projects but also for building APIs in ASP.NET Core, providing consistent JSON serialization.

More info here: https://docs.evergine.com/manual/platforms/web/serialization.html

React Web template improvements

We have made significant improvements to the Evergine React web template, enhancing both performance and flexibility.

1. Faster development with Vite

We have replaced webpack with Vite for building Single Page Applications (SPA). Vite is much faster, allowing the development server to start in seconds and reducing wait times during code changes.

2. Container-Dependent canvas size

Previously, the Evergine canvas size was tied to the browser window. Now, it depends on its container. This makes it easier to control the canvas size, allowing you to embed Evergine in smaller sections of your application.

3. Updated package dependencies

We have also updated the template to use the latest versions of key npm packages, ensuring better performance, security, and compatibility.

Final thoughts

These updates aim to make your Evergine development experience faster and more flexible. Whether you’re handling complex data structures or building modern SPAs, these enhancements should streamline your workflow.

As always, we welcome your feedback and look forward to seeing what you create with Evergine!

Sergio Escalada
Author
Sergio Escalada
Plain Concepts Research

Wait! Don't leave yet.

Sign up for our monthly newsletter to be updated on all the latest news, case studies, and more.

We don't send spam and you can unsubscribe at any time.