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.

wrapper for making isolated component

See original GitHub issue

This issue was already created by me once in cycle/isolate repo. @staltz refused it, but I want others to express opinion.

What about including in isolate module a helper for making components be always isolated.

const isolated = (dataflowComponent) => (...args) =>
  isolate(dataflowComponent).apply(null, args)
import {isolated} from '@cycle/isolate'

const MyComponent = isolated(({DOM, HTTP}) => {
...
})

or it maybe called makeIsolated

I understand that is it is just 2 lines of code, but why not include it? Is creating isolated by default components really exessive and undesirable pattern? What do people think about it?

@TylorS @laszlokorte

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
wclrcommented, Mar 31, 2016

Well I see that useful and makes code a bit cleaner (without exessive isolate words) reusing componetents that are designed to work isolated: But this semantic is quite good:

export default sources => isolate(DoSomethingComponent)(sources)

So closing.

0reactions
laszlokortecommented, Mar 31, 2016

I do not like to isolate my components by default anyway and I agree with @staltz about the confusing naming of isolate(d).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create Wrapper Components in React with Props
To create wrapper components, you'll first learn to use the rest and spread operators to collect unused props to pass down to nested...
Read more >
How to create reusable form components with React Hook ...
We want create a wrapper component that uses both our <Input> component and react-hook-form to create a reusable component that can be passed ......
Read more >
How to: Create COM Wrappers - .NET Framework
You can create Component Object Model (COM) wrappers by using Visual Studio features or the .NET Framework tools Tlbimp.exe and Regasm.exe.
Read more >
How To: Component Isolation | Parabeac Documentation
The basic idea of an isolated component package is to treat the UI layer as its own project that's then imported into your...
Read more >
Wrapper | Vue Test Utils
Vue Test Utils is a wrapper based API. A Wrapper is an object that contains a mounted component or vnode and methods to...
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