Comments (3)
Hey @sladiri,
lift
is the right way to do it if you want to make an existing component accept reactive props. You can also save a lifted version to a variable so you can use it in a more idiomatic React way:
const LiftedTextInput = lift(TextInput)
<F.div>
You have clicked this button {count} time(s).
<Form onSubmit={...}>
<LiftedTextInput name={'username'} label={value} />
</Form>
</F.div>
from focal.
I found the lift function in your tests now, that would be a second way to do it, if you cannot pass an F component. (Example uses inlined lifted component.)
<F.div>
You have clicked this button {count} time(s).
<Form onSubmit={...}>
{lift(TextInput )({ name: "username", label: value })}
</Form>
</F.div>
So I guess that is just the way, somehow you have to lift components to accept observables. :)
from focal.
Thanks, I was just looking at the readme initially. 👍
from focal.
Related Issues (20)
- Set state in state.subscribe() HOT 6
- Quick update of atom with a previous value is ignored HOT 5
- No "empty observable" warning when using a single empty Observable prop HOT 2
- Fix `instanceof Observable` check HOT 1
- Problem with .view and unsubscribe HOT 1
- [Questions] React Ecosystem Support: CRA & React Native? HOT 15
- Replace regex in Lens.prop with Proxy HOT 2
- Can't build a project HOT 2
- Typescript error with strictNullChecks HOT 3
- React hooks HOT 5
- Any CRUD example?
- Uncaught TypeError: f.a.key is not a function HOT 4
- Publish Atom/Lens-only version HOT 5
- Classes in Atoms lose their functions after modification
- Do not log on production HOT 1
- Persistence
- Support for React 17 HOT 2
- Property 'lens' does not exist on type 'ReadOnlyAtom<State>' HOT 1
- yarn audit reports malware HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from focal.