State file management best practices

I have checked the documentation but I did not find how the state file (serverless-state.json) should be treated in a shared environment.

In my team every member can deploy to a playground environment from its machine; we do not know how to manage the state file because we did not find a clear explanation about it.

  • Should we share the state to avoid conflicts? (something like the Terraform state approach).
  • What happen if the state file is deleted\recreated from scratch at every deploy? We use this approach in the CI pipeline which deploys to test/prod.

Thanks a lot.