Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image hook styled #131

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Image hook styled #131

wants to merge 6 commits into from

Conversation

JoshuaRogan
Copy link
Contributor

@JoshuaRogan JoshuaRogan commented Oct 2, 2019

  • Update readme
  • Write tests
  • Test code

Click the theme buttons to re-initialize examples.

```js
<StyledCountdown onTick={value => console.log("Countdown: ", value)} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫

@@ -0,0 +1,101 @@
import React, { useState } from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use React.useState, let's drop this import

setIsLimbo(true);
}, [src]);
// this is odd but it allows us to quickly flush the src when an image src is swapped but react is able to use
// the same DOM element. The other option would be to use keys but then react can't be as efficient.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants