Traditional electric generation based on fossil fuel consumption threatens the humanity with global warming, climate change, and increased carbon emission. Renewable resources such as wind or solar power are the solution to these problems. The smart grid is the only choice to integrate green power resources into the energy distribution system, control power usage, and balance energy load. Smart grids employ smart meters which are responsible for two-way flows of electricity information to monitor and manage the electricity consumption. In a large smart grid, smart meters produce tremendous amount of data that are hard to process, analyze and store even with cloud computing. Fog computing is an environment that offers a place for collecting, computing and storing smart meter data before transmitting them to the cloud. This environment acts as a bridge in the middle of the smart grid and the cloud. It is geographically distributed and overhauls cloud computing via additional capabilities including reduced latency, increased privacy and locality for smart grids. This study overviews fog computing in smart grids by analyzing its capabilities and issues. It presents the state-of-the-art in area, defines a fog computing based smart grid and, gives a use case scenario for the proposed model.