I am trying to use the ios toolbar and import it into a component to use for react native. I don't understand where I went wrong. I am getting the error "uknown module Toolkit.ios.js" when I use var Tool = require('toolkit.ios.js');
The file is there. What Am I missing here? I was trying to follow this tutorial here but with the toolbar component https://facebook.github.io/react-native/docs/native-components-ios.html#content
#import <Foundation/Foundation.h>
@import UIKit;
#import "RCTViewManager.h"
@interface RCTToolBar : RCTViewManager
@end
@implementation RCTToolBar
RCT_EXPORT_MODULE()
- (UIView *)view
{
return [[UIToolbar alloc] init];
}
@end
// MapView.js
var React = require('react-native');
var { requireNativeComponent } = React;
// requireNativeComponent automatically resolves this to "RCTMapManager"
class ToolBar extends React.Component {
render() {
return <RCTToolBar />;
}
}
module.exports = requireNativeComponent('RCTToolBar', ToolBar);
edit: messed up on copy and pasting code.