question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Basic "get" not working

See original GitHub issue

I’m trying to get this to work on ReactNative, using version =0.1.6. Here is the Proxy call:

const example = new Proxy({}, { get: (target, name) => name in target ? target[name] : new Set() });

Unfortunately, that doesn’t give me a set when I call example.anyPropertyName

I’m trying to work through the source code, but It’s a bit above me. Any suggestions on how to get through it?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
samthorcommented, Aug 10, 2017

From the README:

This means that the properties you want to proxy must be known at creation time.

So this generic proxy won’t work.

Out of curiosity, does ReactNative not have a Proxy implementation of its own?

0reactions
gg4ucommented, Oct 5, 2017

Older Safari not working either.

proxy.[test] = ‘test’ and proxy.test will be undefined…

thank you for your help @samthor 👍

defining target = { test : null } and passing it to Proxy(target, handler) I was able to make it work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Axios: Basic auth not working with GET request - Stack Overflow
My code does work if i am doing a post request, so I don't know what i'm doing wrong here. My backend code:...
Read more >
Basic GET request not working with name credential
I have a GET request I want to manage but Authorization Header is not working if I retrieve username and password from Named...
Read more >
auth().basic() not working? · Issue #356 · rest-assured/rest ...
I use auth().basic() to send a basic Authorization header 2. post() 3. rest assured doesn't send the header What is the expected output?...
Read more >
Deprecation of Basic authentication in Exchange Online
Just know that enabling Basic on WinRM is not using Basic to authenticate to the service. For more information, see Exchange Online PowerShell: ......
Read more >
Handling common JavaScript problems - MDN Web Docs
If you are not already familiar with the basics of Troubleshooting JavaScript, you should study that article before moving on.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found