npm

@lightningtv/core
TypeScript icon, indicating that this package has built-in type declarations

2.5.0 • Public • Published

Lightning TV Core for Universal Renderers

Provides an abstraction layer for Lightning Renderer which Universal renders like Solid & Vue can use.

Upgrade guide 2.5

All states in style object must start with a $. So focus: will be $focus. Additionally, any state keys you use must also be prefixed with a $ - states={{ $active: true }} - this will provide better Typescript support.

onBeforeLayout is removed, use onLayout instead onAnimation added onAnimation?: Record<AnimationEvents, AnimationEventHandler>;

  • onAnimationStarted and onAnimationFinished removed, use onAnimation. onEvents is now onEvent with signature onEvent?: Record<NodeEvents, EventHandler>;
  • onLoad and onFailed removed, use onEvent instead
onEvent={{
  loaded: callbackFunc;
}}

Use effects in style is preferred for performance:

border, borderLeft/Right/Top/Bottom, linearGradient, radialGradient, borderRadius are all effects. So rather than using borderRadius, use effects: { border: { width: 10, color: 0x000000ff }, radius: { radius: 8 }} (radius is the only weird one like this)

Package Sidebar

Install

npm i @lightningtv/core

Weekly Downloads

572

Version

2.5.0

License

Apache-2.0

Unpacked Size

227 kB

Total Files

60

Last publish

Collaborators

  • anthony9187
  • erautenberg
  • chiefcll