• Stars
    star
    140
  • Rank 261,473 (Top 6 %)
  • Language
    C++
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Template library and blog that explain how JSI modules are built from scratch in React Native

react-native-jsi-template

This is an example library that explains how anyone can build jsi modules from scratch in React Native. This code is written as a support project for my blog.

Installation

npm install react-native-simple-jsi

For iOS also run pod install in /ios folder.

Prerequisites

You must have Android NDK and CMake installed on android to build the library.

Methods

The following methods are implemented.

Platfom agnostic

The relevant code is present in cpp/example.cpp file.

    helloWorld():string;

    multiplyWithCallback(x:number,y:number,callback:(z:number) => void):void
    
    multiply(x:number,y:number):number

Platform specific

The relevant code on android is in android/cpp-adapter.cpp and ios/SimpleJsi.mm on iOS.

    getDeviceName():string
    
    setItem(key:string,value:string):boolean

    getItem(key:string):string

Basic usage example

import simpleJsiModule from "react-native-jsi-template";

simpleJsiModule.helloWorld() // returns helloworld.

Run the example app for more.

Thanks to these libraries & their authors:

The initial work done by authors of the following libraries has helped a lot in writing the blog and keeping this repo updated.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

More Repositories

1

react-native-mmkv-storage

An ultra fast (0.0002s read/write), small & encrypted mobile key-value storage framework for React Native written in C++ using JSI
C++
1,283
star
2

react-native-actions-sheet

A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
TypeScript
1,147
star
3

react-native-admob-native-ads

A simple and robust library for creating & displaying Admob Native Advanced Ads in your React Native App using Native Views.
Java
350
star
4

rn-floating-video-widget

React Native Module for Floating/Popup video player on Android.
Java
54
star
5

react-native-scoped-storage

Java
50
star
6

drawing-board

A fully native drawing app made with react-native-skia with 60 frames per second performance
TypeScript
37
star
7

react-native-ijkvideo

A Cross Platform (Android & iOS) video & audio component with react-native-video like API & all formats support based on IJKPlayer FFMpeg 3.4
Java
25
star
8

react-native-gzip

Java
10
star
9

solidjs-native

JavaScript
9
star
10

react-native-geckoview

GeckoView implementation on android for React Native.
Java
9
star
11

solid-navigation

TypeScript
8
star
12

nativescript-solidjs-example

TypeScript
5
star
13

react-native-wireguard

Swift
5
star
14

nativescript-v8-module

C++
3
star
15

lit-example

JavaScript
2
star
16

svelte-exp

JavaScript
2
star
17

nativescript-render-perf-test

TypeScript
1
star
18

nativescripte-template-blank-solid

TypeScript
1
star
19

rnboilerplate

Boilerplate code for starting every react native project.
JavaScript
1
star