URL and URLSearchParams is not working
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Description
I was working with React Native and I needed to parse a URL to get a parameter, for that I used the URL class and got the serialized searchParams, but in every attempt it gave all kinds of errors.
const url = new URL('https://somesite.com/?search=param')
console.log(url.searchParams.get('search')) // Throw 'URLSearchParams.get is not implemented'
console.log(url.searchParams.toString()) // ''
React Native Version
0.72.3
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: Linux 5.4 Linux Mint 20 (Ulyana)
CPU: (2) x64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
Memory: 304.14 MB / 1.92 GB
Shell:
version: "5.8"
path: /usr/bin/zsh
Binaries:
Node:
version: 18.12.1
path: /usr/local/bin/node
Yarn:
version: 1.22.19
path: ~/.yarn/bin/yarn
npm:
version: 8.19.2
path: /usr/local/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 11.0.19
path: /usr/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.3
wanted: 0.72.3
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Steps to reproduce
1 - Clone the repo
2 - Install its dependecies
3 - Run the project using your favorite platform
4 - Try to input some url
Snack, screenshot, or link to a repository
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với hành vi đã được báo cáo của URL và URLSearchParams trong repository tái hiện của React Native 0.72.3 tại github.com/natanfeitosa/RNUrlBugReport. Chạy ví dụ và xác minh cả searchParams.get('search') lẫn searchParams.toString(). Hoàn tất khi các lệnh gọi này trả về giá trị truy vấn và các tham số đã tuần tự hóa như mong đợi mà không có lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react-native
- Lĩnh vực
- mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100