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.

Example with multiple components

See original GitHub issue

I tried a few things to get it working, but I’m not there yet (see #26).

Example

I have a Page (component) and another component representing a User. The Page will show a colleciton of User components.

If I add the following to Page.js

import { SimpleImg, SimpleImgProvider } from 'react-simple-img'

class Page {
  // ...

 render () {
  return this.props.users.map((user) => <User {...user} SimpleImg={SimpleImg} />)
}
}

export default SimpleImgProvider(Page, { threshold: 0.5 })

And in User.js I use props.SimpleImg, the images are never updated, only the placeholder is shown.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
yusintocommented, Aug 5, 2018

Nice work thank you

On Sun, 5 Aug 2018 at 11:29 am, Bill notifications@github.com wrote:

Hi @millette https://github.com/millette i have updated with a patch to fix the provider bug 😃

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bluebill1049/react-simple-img/issues/27#issuecomment-410488753, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhO9WIR8qEfruOjOIvYLqd5JKWFMnx1ks5uNkp7gaJpZM4Vmu-I .

1reaction
bluebill1049commented, Jul 31, 2018

I will take a look the provider issue soon over the weekend. To be honest i probably need to update the context API too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple Components | React
In React, an owner is the component that sets the props of other components. More formally, if a component X is created in...
Read more >
multiple component collocation | meanings and examples of use
Examples of multiple component in a sentence, how to use it. 15 examples: This becomes essential when multiple component programs are being tested, ......
Read more >
Multiple Components - ts - TUTORIAL - Angular
Multiple Components. Refactor the master/detail view into separate components. The AppComponent is doing everything at the moment.
Read more >
Usage Across Multiple Components - Thinkster.io
This component is going to comprise of the Banner and MainView components. Let's start with Banner. This component is what is known as...
Read more >
Advanced examples with multiple components? #18 - GitHub
Advanced examples with multiple components? #18. Closed. soullivaneuh opened this issue on Nov ...
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