Skip to content

Instantly share code, notes, and snippets.

Created December 10, 2018 02:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save haruelrovix/b291e8a4f34577d94e85570d304b82fe to your computer and use it in GitHub Desktop.
RNW x RNE: RNVI works like a charm with RNW!
import React from 'react';
import ReactDOM from 'react-dom';
// Generate required css
import iconFont from 'react-native-vector-icons/Fonts/FontAwesome.ttf';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
const iconFontStyles = `@font-face {
src: url(${iconFont});
font-family: FontAwesome;
// Create stylesheet
const style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet) {
style.styleSheet.cssText = iconFontStyles;
} else {
// Inject stylesheet
ReactDOM.render(<App />, document.getElementById('root'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment