URL
React Native for Vega includes a complete implementation of the URL Web API, supporting all standard properties: hash, host, hostname, href, origin, password, pathname, port, protocol, search, searchParams, and username.
Trailing Slash Bug Fix
Vega's URL implementation includes a fix for a known React Native issue #24428 where URLs incorrectly received automatic trailing slashes. For example, in stock React Native, a URL like https://example.com was incorrectly converted to https://example.com/, potentially causing 404 errors or unexpected behavior.
This issue has been resolved in React Native for Vega, so developers can use the URL class without needing third-party polyfills such as react-native-url-polyfill.
Example
This example demonstrates the fixed trailing slash issue.
const url = new URL('https://example.com/path/to/resource.png');
console.log(url.href); // Correctly outputs: https://example.com/path/to/resource.png
Last updated: Mar 02, 2026

