New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lemni/core

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lemni/core

A reactive framework based on React

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Lemni

Lemni allows us to implement React components and aplications in a functional and reactive way, making it much more natural to deal with the asynchronicity of interfaces, as well as isolating side effects away from the actual implementation.

Installation

You may install Lemni through npm or Yarn:

npm i @lemni/core

# or

yarn add @lemni/core

Hello World

Lemni creates conventional React components, fully compatible with the entire React ecosystem, including React Native.

import ReactDOM from 'react-dom'
import { lemni } from 'lemni'

const HelloWorld = lemni(
  sources => ({
    view: (viewArgs) =>
      <div>
        <p>Hello World</p>
      </div>
  })
)

ReactDOM.render(
  <HelloWorld />,
  document.getElementById('app')
)

Basic Component

import { lemni } from 'lemni'
import xs from 'xstream'

const Incrementer = lemni(sources => {
  const onIncrement = xs.Stream.create()

  return {
    initialState: {
      count: 0,
    },

    stateReducer: onIncrement.mapTo(
      state => ({
        count: state.count + 1,
      })
    ),

    view: ({ state, emitter }) => (
      <p>Count: {state.count}</p>
      <button onClick={emmiter(onIncrement).emit}>
        Increment
      </button>
    )
  }
})

Docs

To better understand the above example and to see what else Lemni is capable of, head to the docs:

https://italonascimento.github.io/lemni/

License

MIT

FAQs

Package last updated on 15 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc