Last active
June 29, 2022 07:17
-
-
Save dayaki/c3c5baf676cecae7e968d65383dee7a1 to your computer and use it in GitHub Desktop.
Blockli template file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { NativeModules } from "react-native"; | |
const { RNCustomCode } = NativeModules; | |
// Import needed Blockli Blocks here | |
import { | |
initialize, | |
BlockliVideo, | |
} from "@blocklienterprise/blockli"; | |
import config from "@src/build_config.json"; | |
export const applyCustomCode = async (externalCodeSetup) => { | |
const { blocksApi } = externalCodeSetup; | |
// You MUST all this function with your License code to be able to use Blockli Blocks | |
await initialize("LICENSE-CODE-HERE", config.app_id); | |
// Here is a sample call to use Blockli Blog Block. | |
// Watch our "how-to" to learn how to add other Blockli Blocks. | |
blocksApi.addCustomBlockRender("blockli/blog-cards", (props) => ( | |
<BlockliBlog {...props} /> | |
)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment