You're getting that error because the code to initialize display
is getting run on the server, and the server does not have access to browser APIs like window
. To solve this you can use browser
to check if ...
In Zig, you can convert integers to strings using either bufPrint
or allocPrint
formatting functions in std.fmt
depending on your needs. You can use std.fmt.bufPrint
to write the formatted integer...