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.

Is it possible/recommended to create custom effects?

My team was throwing around the idea, and on looking at the existing effects in src/internal/io.js it looks like this wasn’t really intended.

What do you think?

Issue Analytics

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

github_iconTop GitHub Comments

12reactions
yelouaficommented, Jun 30, 2016

I guess in this scenario, followLink is a more specialised form of call.

Exact. You can create an effect creator which builds the specialized call effect.

For example


// Saga to handle the effect logic
function* followLinkSaga(url) {
   yield call(fetch, url)
   //... retry logic
}

// Effect creator
function followLink(url) {
  return call(followLinkSaga, url)
}

// Use it like other effects
function* saga() {
   const {url} = yield take(ACTION)
   yield followLink(url)
}
0reactions
christian-schulzecommented, Jun 30, 2016

This is excellent advice, and a very simple refactor to existing code. Will take this idea for a spin tomorrow, but please consider this issue solved 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Affects | Window Tinting Professionals in Midland Texas
Welcome to Custom Affects! ... Thank you for your patience while we work to enhance the user experience of our website for all...
Read more >
Custom Affects | Midland TX - Facebook
Custom Affects, Midland, Texas. 4365 likes · 15 talking about this · 214 were here. Custom Affects specializes in window tinting, car audio,...
Read more >
CUSTOM EFFECTS - LinkedIn
We focus on the production of commercials on actions for Digital Channels and TV. We are specialized in technical shootings and 3D productions....
Read more >
TH custom effects – DIY boutique effects and little helpers for ...
They are a great source of information about effect pedals. We have a lot of their designs available as PCBs for you to...
Read more >
Creating custom effects | Substance 3D Painter
Substance effects must be built in a specific way in Substance 3D Designer to work correctly once imported in Substance 3D Painter. Custom...
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