//
//  RCTMyWebViewManager.m
//  RNMyWebModule
//
//  Created by Elad on 15/06/2020.
//  Copyright © 2020 Facebook. All rights reserved.
//

#import "RNCPersistentWebview.h"
#import "RNCWKWebView.h"


static RNCWKWebView *webview;

@interface RNCPersistentWebview ()

@end

@implementation RNCPersistentWebview { }


- (UIView *)view {
  return webview;
}

- (RNCWKWebView *)webview {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        webview = [RNCWKWebView new];
    });
    return webview;
}

- (void)destroy {
    webview = nil;
}

@end
