Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@wemap/expo-livemap
Advanced tools
A custom WebView component for Expo applications that exposes a Livemap component and methods to interact with it.
npm install @wemap/expo-livemap
import React from 'react';
import { View } from 'react-native';
import { LiveMap } from '@wemap/expo-livemap';
function App() {
const handleCustomMessage = (event) => {
console.log('Received message from LiveMap:', event);
};
return (
<View style={{ flex: 1 }}>
<LiveMap
source={{ uri: 'https://livemap.getwemap.com' }}
onCustomMessage={handleCustomMessage}
/>
</View>
);
}
import React, { useRef } from 'react';
import { View, Button } from 'react-native';
import { LiveMap, LiveMapRef } from '@wemap/expo-livemap';
function App() {
const mapRef = useRef<LiveMapRef>(null);
const handleCustomMessage = (event) => {
console.log('Received message from LiveMap:', event);
};
const sendMessageToMap = () => {
mapRef.current?.postCustomMessage('Hello from React Native!');
};
return (
<View style={{ flex: 1 }}>
<LiveMap
ref={mapRef}
source={{ uri: 'https://livemap.getwemap.com' }}
onCustomMessage={handleCustomMessage}
/>
<Button
title="Send Message to LiveMap"
onPress={sendMessageToMap}
/>
</View>
);
}
Inside your web content, you can send messages to React Native using the injected postCustomMessage function:
// Send message from LiveMap to React Native
window.postCustomMessage({
type: 'mapEvent',
data: 'Map is ready!'
});
The component accepts all standard React Native WebView props plus:
onCustomMessage: (event: any) => void Callback function that handles messages sent from the LiveMap
postCustomMessage(message: string): Sends a message to the LiveMap reload(): Reloads the LiveMap
The package includes TypeScript definitions. For TypeScript projects, you can import types:
import { LiveMapProps, LiveMapRef } from '@wemap/expo-livemap';
MIT
Simon Milleto simon@getwemap.com
FAQs
Expose a Livemap component and methods to interact with it
The npm package @wemap/expo-livemap receives a total of 8 weekly downloads. As such, @wemap/expo-livemap popularity was classified as not popular.
We found that @wemap/expo-livemap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.