I am trying to use the ios toolbar and import it into the component that will be used for the native reaction. I don’t understand where I was wrong. I get the error "uknown module Toolkit.ios.js" when I usevar Tool = require('toolkit.ios.js');
There is a file. What am I missing here? I tried to follow this guide here, but with the toolbar component
https://facebook.imtqy.com/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;
class ToolBar extends React.Component {
render() {
return <RCTToolBar />;
}
}
module.exports = requireNativeComponent('RCTToolBar', ToolBar);
edit: the copy and paste of the code is corrupted.
source
share