frint-react-native

0.1.0 • Public • Published

frint-react-native npm Build Status License

React Native integration for FrintJS.

Install

You should already have these FrintJS dependencies first:

$ npm install --save frint frint-react

Now you can install the package for React Native integration:

$ npm install --save frint-react-native

Usage

You can write a regular FrintJS application with React first:

// App.js
import { createApp } from 'frint';
import React from 'react';
import { View, Text } from 'react-native';
 
function Root() {
  return (
    <View>
      <Text>Hello World!</Text>
    </View>
  );
}
 
const App = createApp({
  name: 'MyReactNativeProject',
  providers: [
    {
      name: 'component',
      useValue: Root,
    },
  ],
});
 
export default App;

Now instantiate and register it to React Native:

// index.js
import { register } from 'frint-react-native';
 
import App from './App';
 
const app = new App();
register(app);

License

MIT

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i frint-react-native

    Weekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • fahad19