init
The init function has to been called before using asm-dom, in the main function, to prepare its environment. It takes a Config struct defined as follows:
struct Config {
bool clearMemory = true;
bool unsafePatch = false;
}
clearMemory:trueby default, set it tofalseif you want to free memory manually, for more information see memory management.unsafePatch:falseby default, set it totrueif you haven't a singlepatchin your application. This allows you to call patch with anoldVnodethat hasn't been used previously.
Config config = Config();
config.unsafePatch = true;
init(config);