title: Flutter redux: StoreConnector vs StoreProvider
body: <p>I've been using flutter_redux for only very few days and I'm wondering what's the difference between:</p>
  
  <pre><code>class BtnCustom extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      final store = StoreProvider.of&lt;AppState&gt;(context);
  
      return FlatButton(
        onPressed: store.dispatch(MyCustomAction),
        child: Text(store.state.MyCustomTxt),
      );
    }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>class BtnCustom extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return StoreConnector&lt;AppState, _ViewModel&gt;(
        converter: (store) =&gt; _ViewModel(
            txt: store.state.MyCustomTxt,
            onPressed: store.dispatch(MyCustomAction)),
        builder: (BuildContext context, _ViewModel vm) {
          return FlatButton(
            onPressed: vm.onPressed,
            child: Text(vm.txt),
          );
        },
      );
    }
  }
  
  class _ViewModel {
    final String txt;
    final void Function() onPressed;
  
    _ViewModel({this.txt, this.onPressed});
  }
  </code></pre>
  
  <p>?</p>
  
  <p>The first one seems so handy to use. Are they any advantages or drawbacks of using one over another I should be aware of?</p>
  
  <p>According to the documentation, the StoreConnector will rebuild the widget in it so:</p>
  
  <ul>
  <li>Is it ok to not use a StoreConnector when you don't need to rebuild a widget?</li>
  <li>Is it ok to have multiple widgets within a StoreConnector?</li>
  </ul>