0.0.16 • Published 9 months ago

achive-mx-explorer v0.0.16

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

Achive MX Explorer

achive-mx-explorer is a React Native module that provides the MXWidget component for easy integration of MX web views and context-driven API interactions into your React Native projects.

Installation

Install via NPM

If the package is published on npm, you can install it directly by running:

npm install achive-mx-explorer

Local Installation (before publishing to npm)

If you’re using the package locally (for testing before publishing it to npm), you can install it like this:

  1. In the achive-mx-explorer directory, create a .tgz file by running:

npm pack

  1. Move the .tgz file to your other project and install it:

npm install ./path-to/achive-mx-explorer-0.0.1.tgz

Note: You do not need to build the package yourself. The necessary files will already be included in the dist folder when you install the package.

Usage

Once installed, you can import and use the MXWidget component in your project by passing the accessToken like this:

Example

import React from 'react';
import { View } from 'react-native';
import { MXWidget } from 'achive-mx-explorer';

const App = () => {
  const accessToken = 'your-access-token';

  return (
    <View style={{ flex: 1 }}>
      <MXWidget accessToken={accessToken} />
    </View>
  );
};

export default App;

Props

• accessToken (string) - The access token required to authenticate API requests in the MX widget.

Optional: Context Usage

If your MXWidget depends on a context to pass the access token, you can wrap the widget in the relevant context provider:

import React from 'react';
import { WebViewContext } from 'achive-mx-explorer';
import { MXWidget } from 'achive-mx-explorer';

const App = () => {
  const accessToken = 'your-access-token';

  return (
    <WebViewContext.Provider value={{ accessToken }}>
      <MXWidget />
    </WebViewContext.Provider>
  );
};

export default App;

Development

Building the Package

If you are the developer working on the package, you can build the project to generate the dist/ folder by running:

npm run build

This compiles the TypeScript files into JavaScript for distribution.

License

This project is licensed under the MIT License.

0.0.13

9 months ago

0.0.14

9 months ago

0.0.15

9 months ago

0.0.16

9 months ago

0.0.10

9 months ago

0.0.11

9 months ago

0.0.12

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago