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.

have redux-saga removed

See original GitHub issue

At the moment we are using redux-saga as part of the state-management. This shouldn’t be needed since the data-flow within the dext itself is pretty straight forward.

we can even go as far as to consider having redux removed.

There are some strong points where redux would shine in a smaller application like dext but they wouldn’t outweigh simplicity nor attempt to just use React’s own recommended patterns.


something to consider

In fact, IMO using the new Context API would be the perfect tool for us to leverage for our use case, such as UI configuration, in conjunction with just props being passed down from one “interface” or prop-getters.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
adnasacommented, Apr 15, 2018

One cool thing about using context here would be to eliminate imports of ipcRenderer, which essentially means that we leak electron functionality into our components.

Admittedly, I have yet to try out the new Context API, but even with the old approach, you could see the benefit

class A extends React.Component {
  getChildContext () {
    return {
      socket: ipcRenderer,
    }
  }
}

class B extends React.Component {
  static contextTypes = {
    // because `context`, `socket` doesn't have to interface `ipcRenderer`
    socket: PropTypes.shape({
      on: PropTypes.function.isRequired,
    })
  }
}

// unit-test
// mock all the things..
const view = shallow(
  <B {...props} />,
  {
    socket: {
      on: jest.fn()
    }
  }
)
1reaction
adnasacommented, Apr 14, 2018

Let’s try to get React updated to the latest version

I’m on it 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why removed Redux Saga? · Issue #141 - GitHub
Saga has been removed from this boilerplate because we now use redux-toolkit. Redux toolkit allow us to create easily redux code and use...
Read more >
Best way to remove redux saga from an old app?
I'm in the process of upgrading from Apollo client 1 to 3. What would be the best way to rip out redux saga...
Read more >
Task Cancellation | Redux-Saga
Here you can use yield cancelled() to check if the Generator has been cancelled or not. Cancelling a running task will also cancel...
Read more >
React redux saga #15 remove item from cart #react-saga
React js Latest Playlist in hindi : https://www.youtube.com/playlist?list=PL8p2I9GklV47BCAjiCtuV_liN9IwAl8pMinst id: @code.
Read more >
React redux saga #9 Remove to Cart - YouTube
React js Latest Playlist in hindi : https://www.youtube.com/playlist?list=PL8p2I9GklV47BCAjiCtuV_liN9IwAl8pMinst id: @code.
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