Is there a good way to self reference the actor id during initialization of values?
shared actor class TeamActor() : async Types.TeamActor = this {
stable let team = TeamState.TeamState(Principal.fromActor(this)); // Error: `cannot use this before this has been defined`
}
This is an annoying restriction. We are trying to lift it but for the moment, your best bet, if you can make it work, is to pass the principal in as an argument to the class, or lazily initialize it from a shared function, where this is considered defined.