         data = Data()
         let client = WukongClient.sharedInstance
         client.subscribeChange {
-            //TODO
+            var resultsChanged = false
+            defer {
+                if resultsChanged {
+                    self.collectionView?.reloadSections(IndexSet(integer: 0))
+                }
+            }
+            if let results = client.getState([.search, .results]) as [[String: Any]]? {
+                resultsChanged = !self.data.results.elementsEqual(results) {
+                    let id0 = $0[Constant.State.id.rawValue] as? String
+                    let id1 = $1[Constant.State.id.rawValue] as? String
+                    return id0 == id1
+                }
+                self.data.results = results
+            }
         }
     }
     

        super.viewDidLoad()
        collectionView?.backgroundColor = UIColor.white
        collectionView?.alwaysBounceVertical = true
        //TODO
    }

    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {

//

import UIKit
import SafariServices

class SearchViewController: UICollectionViewController {

    fileprivate var data = Data()
    fileprivate struct Data {
        var results: [[String: Any]] = []
    }

    init() {
