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.

Improving dependencies

See original GitHub issue

Hey Sara! 👋

  1. I see this package has jest as a (non-dev) dependency. Is this expected?
  2. Could we add react as a peer dependency?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
KittyGiraudelcommented, Aug 13, 2018

No, that’s the entire point, it would. Let me clarify my example. This is your current implementation:

https://github.com/SaraVieira/react-social-sharing/blob/be8cb254ba3ee4b151c64c8465e91e3aef7f0b89/src/buttons/factory.js#L23-L31

On line 29 and 30, instead of doing Share on ${ariaName || name}, you would do something like:

typeof label === 'function' // Or the name you want for the prop
  ? label(ariaName || name)
  : 'Share on ${ariaName || name}

Which would allow a user to have something like:

<Twitter
  link="https://github.com"
  label={serviceName => localise('share_label', { serviceName })}
/>

With the English version of share_label being something like “Share that link on {{ serviceName }}” or whatever.

Basically, if a function is being given to you, you call it with the service name, otherwise you default to English. Does it make sense?

0reactions
SaraVieiracommented, Jan 7, 2019

I am so sorry this completly slipped my notifications 😦

It has been added in https://github.com/SaraVieira/react-social-sharing/releases/tag/v3.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

17 Dependency Management Hacks to improve flow efficiency
1. Planning & Scheduling · 2. Program Dependency Board · 3. Visualise Blockers · 4. Reduce Systemic WIP · 5. Monitor and reduce...
Read more >
How Visualizations Can Improve Your Dependencies ...
Here's how to optimize dependencies management — anticipating, identifying, and resolving dependencies that keep other projects from getting completed.
Read more >
Scaling teams and managing dependencies | by Ronald Doelen
Teams build a dependency board to visualise dependencies. This normally a low tech solution based on brown paper, sticky notes and yarn.
Read more >
How dependency mapping can lead to better project outcomes
Here are some key focus areas to help you do that. Practice continuous improvement to reduce the need for dependencies: be proactive about ......
Read more >
Agile Teams: Dependency Management and Visualization
Within a single project, dependencies exist. See how to identify, map, and manage dependencies to increase agility and reduce waste inside Agile teams....
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