Converting Function to Use Effect - Effect Community