Smart grid is a new vision of the conventional power grid to integrate green and renewable technologies. Smart grid (SG) has become a hot research topic with the development of new technologies, such as IoT, edge computing, artificial intelligence, big data, 5G, and so on. The efficiency of SG will be increased by smart embedded devices that have intelligent decision-making ability. Various types of sensors and data sources will collect data of high resolution. One of the vital challenges for IoT is to manage a large amount of data produced by sensors. Sending this massive amount of data directly to the cloud will create problems of latency, security, privacy, and high bandwidth utilization. This issue is addressed by edge computing (EC). In EC, the data are processed at the edge of the network that is near the embedded gadgets. This paper provides a comprehensive review of the smart grid systems, based on IoT and EC. The development in the rising technologies, the framework for EC-IoT-based SG, and requirements to implement the EC-IoT-based SG system are highlighted in the paper. Framework for EC-IoT-based SG is examined, and important requirements to implement the EC-IoT-based SG system are outlined. Finally, some critical issues and challenges faced in the implementation of EC-IoT-based SG systems are identified. Some important open research issues are also identified.