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

Add import command #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add import command #37

wants to merge 1 commit into from

Conversation

7022Andre
Copy link

This line (import ReactCountdownClock from 'react-countdown-clock';) needs to be added to the component where you want to use the countdown (most likely at the top of the component). I added it to this readme because some developers might not know how to import it (like me :).

This line (`import ReactCountdownClock from 'react-countdown-clock';`) needs to be added to the component where you want to use the countdown (most likely at the top of the component). I added it to this readme because some developers might not know how to import it (like me :).
@pughpugh
Copy link
Owner

I think I was being vague as I do not know what module system the consuming code is using; Node require vs. ES6 import. I suppose it would be best to give an example in both. At times like this I generally look at other react modules, to see how they would document this.

@7022Andre
Copy link
Author

I looked at other GitHub react repos and they either list require or import but I think using import is getting to be more common (with ES6 as the "new" JS version and being used in newer react versions). Do you think var ReactCountdownClock = require('react-countdown-clock'); should still be added to the readme?

@abhijit-Amne
Copy link

I think having the import statement (in any one form) in the readme file would help the users and avoid wasting time guessing the import statement.

I had to go to this pull request to know the proper import statement.

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

Successfully merging this pull request may close these issues.

None yet

3 participants