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.

Problem on setting inputs for a component duplication (same comp rendered more then one time)

See original GitHub issue

In my case I have a list of components that I render using a *ngfor:

 ... *ngFor="let dashboardItem of dashboard ..."
    <ndc-dynamic 
          [ndcDynamicComponent]=components[dashboardItem.component.name]
          [ndcDynamicInputs]="dashboardItem.component">
     </ndc-dynamic>

where “components” is an array containing the components list to render.

My problem occur when in this comps list there are more then one the same component, in that case the inputs of the second component will overwrite the first componet inputs.

How can I do in order to have differents instances for each component?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cristreetcommented, Sep 5, 2019

It was an error, in my code, about the inputs instance and not about the component. Thanks

0reactions
epoch79commented, Oct 14, 2019

thank you…

Read more comments on GitHub >

github_iconTop Results From Across the Web

React component table is being rendered multiple times or ...
In render, the data is either being duplicated or rendering multiple times from the state after it is reset with new props. It...
Read more >
Minimize Code Duplication and Performance Problems in ...
Common causes for code duplication. At the same time several programmers working on various parts of the same program; Different pieces of code ......
Read more >
Encountered Two Children with the Same Key — React Fix
The Problem​​ When you are rendering React components in a map function inside the render function, you must provide a key prop to...
Read more >
Logic Pro release notes - Apple Support
Resolves an issue where Logic would quit unexpectedly when converting region-based automation to track-based automation if the track had more ...
Read more >
Unexplained Windows or software behavior may be caused ...
Describes behavior that may occur if your computer has deceptive software that is installed ... You may experience one or more of the...
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