Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

view

v0.26.1arrow_drop_down
v0.26.1
STATUS
Passing
DOWNLOADS
56
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
835 B
subject
Returns a "view" of the given data structure, determined by the given lens. The lens's focus determines which portion of the data structure is visible.
1 contributor
Use view in your project ?
Copied
npm i @bit/ramda.ramda.view
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
view(xLens, {
  x: 1,
  y: 2
});
modifieddraft
chevron_left
chevron_right
view (
lens:Lens,
x:*
) : *

Returns a “view” of the given data structure, determined by the given lens. The lens’s focus determines which portion of the data structure is visible.

Example
const xLens = R.lensProp('x');

     R.view(xLens, {x: 1, y: 2});  //=> 1
     R.view(xLens, {x: 4, y: 2});  //=> 4
Arguments
lens: Lens
x: *
Returns
*