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.

Each connected component creates an extra component in the react tree.

A custom hook would be a better solution as storeon already use hooks. This could reduce bundle size and improve performance.

The connect HOC could be an opt-in. It could use the custom hook underneath.

Thoughts on this?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
aicommented, Mar 29, 2019

@hadeeb I copied React.memo API.

connect(...args)(Component) API requires more symbols from developer to use.

react-redux uses this API because it was the API of ES decorators. But TC39 changed the decorator API again, so we do not need a reason to use this API anymore.

0reactions
aicommented, Mar 29, 2019

Renamed 06ccdd6

Waiting for TS update before making the release

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building Your Own Hooks - React
Custom Hooks offer the flexibility of sharing logic that wasn't possible in React components before. You can write custom Hooks that cover a...
Read more >
React Custom Hooks - W3Schools
Hooks are reusable functions. When you have component logic that needs to be used by multiple components, we can extract that logic to...
Read more >
React: How to create a Custom Hook - Robin Wieruch
Custom Hooks consist of built-in React Hooks or other custom Hooks. Therefore a custom Hook is always a new composition of one or...
Read more >
useHooks - Easy to understand React Hook recipes
We bring you easy to understand React Hook code recipes so you can learn how React hooks work and feel more comfortable writing...
Read more >
How to create your own custom React Hooks
In React, a custom Hook is a function that starts with the word “use” and may call other Hooks. The “useWhatever” naming convention...
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