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.

<Cmp error={...} /> is a namespace clash

See original GitHub issue

I am using universal with great happiness, but I discovered an issue with the resulting component: it eats isLoading and error props, both pretty likely to be real component props.

Case in point, I’m wrapping react-select as a Field for redux-form, and having a from error results in the error being rendered instead of the component. It is very inconvenient to have to rename the error using 2 wrapper components 😦

I propose to namespace these props, e.g. universalLoading and universalError. This could be made optional?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
faceyspaceycommented, Jan 26, 2018

Can’t default to false. We need backwards compatibility. 3 + 4 minus defaulting to false.

PR idea approved

1reaction
wmertenscommented, Jan 26, 2018

Options:

  1. put all props related to r-u-c under a prop: universal={{error, isLoading, etc}}
  2. rename props individually: universalError, universalIsLoading
  3. make props configurable: const Cmp = universal(()=>import('./Cmp'), {errorProp: 'universalError'})
  4. same as 3, but make each prop also configurable as false if it should not be used, and default to false.

I think I prefer option 4. @faceyspacey if you think this is a good addition I’ll be happy to make a PR…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Name conflict between namespace and class template
The spec says. During the lookup for a base class name, non-type names are ignored ([basic.scope.hiding]). The name is Foo<Type> , it's a ......
Read more >
Namespace conflict between 'pyserial' and 'serial ... - GitHub
Hi. Running python esptool.py chip_id causes: python esptool.py chip_id esptool.py v2.3-dev Traceback (most recent call last): File "esptool.py", line 2606, ...
Read more >
Error occured after changing the apex Controller name [closed]
I have removed all the controller names in lightning components where i have refered the apex controller Name .Now the error is not...
Read more >
Go Frequently Asked Questions | Protocol Buffers
The way to best fix a namespace conflict depends on the reason why a conflict is occurring. Common ways that namespace conflicts occur:...
Read more >
Error 40020 (http: 409): Namespace conflict ... - Dell
The issue is a User Admin can't own more than one namespace. The problem is for ECS 2.2.0, if the User Admin is...
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