title: protocol extension doesn't work with RCT_EXPORT_VIEW_PROPERTY?
body: <p>I have a partial base class RNChartBaseView (protocol and extension), and bunch of subclass like RNLineChartView, RNBarChartView etc.</p>
  <p>RNChartBaseView.swift</p>
  <pre><code> protocol RNChartBaseView {
        associatedtype T: ChartViewBase;
        associatedtype U: ChartDataEntryBase;
  
        var chart: T { get }
  
        func createEntries(_ data: NSDictionary) -&gt; [U];
  
        func setData(_ data: NSDictionary);
  
   }
  
   extension RNChartBaseView  {
         func setData(_ data: NSDictionary) {
             
             let chartData = createEntries(data);
  
             chart.data = chartData;
         }
   }
  </code></pre>
  <p>RNLineChartView.swift</p>
  <pre><code> class RNLineChartView : UIView, RNChartBaseView{
  
        let _chart:LineChartView;
       
        var chart: LineChartView {
           return _chart
        }
  
        override init(frame: CGRect) {
           self._chart = LineChartView(frame: frame);
  
           super.init(frame: frame);
  
           self.addSubview(_chart);
        }
  
        func createEntries(_ data: NSDictionary) -&gt; [LineDataEntry] {
  
          // ....... convert to LineDataEntry array.
          return entries;
  
        }
  
   }
  </code></pre>
  <p>RNLineChartViewManagerSwift.swift</p>
  <pre><code> @objc(RNLineChartViewManagerSwift)
   class RNLineChartViewManagerSwift: RCTViewManager {
     override func view() -&gt; UIView! {
       let ins = RNLineChartView()
       return ins;
     }       
   }
  </code></pre>
  <p>RNLineChartViewManager.m</p>
  <pre><code> #import &quot;React/RCTViewManager.h&quot;
  
   @interface RCT_EXTERN_MODULE(RNLineChartViewManagerSwift, RCTViewManager)
  
   RCT_EXPORT_VIEW_PROPERTY(data, NSDictionary)
  
   @end
  </code></pre>
  <p>But I get</p>
  <p><code>[reactNativeCharts.RNLineChartView setData:]: unrecognized selector sent to instance 0x7fdf60e04510'</code></p>
  <p>if I copy setData from extension to RNLineChartView.swift, every thing works fine.</p>
  <p>where is the problem?</p>
  <h1>Update</h1>
  <p>It seems a base class is necessary.</p>
  <p>But following code is not elegant, How to write it in a proper way?</p>
  <p>RNChartBaseViewClass</p>
  <pre><code>class RNChartBaseViewClass: UIView, RNChartBaseView {
      
      var chart: ChartViewBase {
          fatalError(&quot;subclass should override this function.&quot;)
      };
  
      
      override init(frame: CGRect) {
          fatalError(&quot;subclass should override this function.&quot;)
      }
  
      func createEntries(_ data: NSDictionary) -&gt; [BaseChartDataEntry] {
          fatalError(&quot;subclass should override this function.&quot;) 
      }
  
  
  
      func setData(_ data: NSDictionary) {
          let chartData = createEntries(data);
  
          chart.data = chartData;
      }
  }
  </code></pre>
  <p>RNLineChartView.swift</p>
  <pre><code>class RNLineChartView : RNChartBaseViewClass{
        var _chart : LineChartView;
        override var chart: LineChartView {
           return _chart
        }
  
        override init(frame: CGRect) {
           self._chart = LineChartView(frame: frame);
  
           super.init(frame: frame);
  
           self.addSubview(_chart);
        }
  
        override func createEntries(_ data: NSDictionary) -&gt; [BaseChartDataEntry] { 
             // I have to use [BaseChartDataEntry] here as return type to pass compile,
             //  although it actually is [LineDataEntry],  it may cause further problems, e.g. 
          // ....... convert to LineDataEntry array.
          return entries;
  
        }
   }
  </code></pre>
  <h1>Update</h1>
  <p>At last , I use a combination of extension and subclass.</p>
  <p>the template code is in extension. and In the RNChartBaseViewClass</p>
  <pre><code>class RNChartViewBaseClass: UIView, RNChartViewBase {
        ......
        func setData(_ data: NSDictionary) {
            (self as RNChartViewBase).setData(data)
        }
  }
  </code></pre>