message: Wrap state changes with useEffect to stop infinite re-rendering
diff: @@ -53,9 +53,11 @@ export const EntityAirbrakeWidget = ({ entity }: { entity: Entity }) => {
  ComponentState.Loading,
  );
  + useEffect(() => {
  if (!projectId) {
  setComponentState(ComponentState.NoProjectId);
  }
  + }, [projectId]);
  const { loading, value, error } = useAsync(async () => {
  const result = await airbrakeApi.fetchGroups(projectId);
  @@ -63,16 +65,15 @@ export const EntityAirbrakeWidget = ({ entity }: { entity: Entity }) => {
  return result;
  }, [airbrakeApi, projectId]);
  + useEffect(() => {
  if (loading) {
  setComponentState(ComponentState.Loading);
  }
  + }, [loading]);
  + useEffect(() => {
  if (componentState !== ComponentState.NoProjectId && error) {
  setComponentState(ComponentState.Error);
  - }
  -
  - useEffect(() => {
  - if (componentState === ComponentState.Error && error) {
  errorApi.post(error);
  }
  }, [componentState, error, errorApi]);
  