Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storybook/react-native

Package Overview
Dependencies
Maintainers
0
Versions
587
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/react-native

A better way to develop React Native Components for your app

  • 8.3.0-alpha.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
201K
decreased by-10.12%
Maintainers
0
Weekly downloads
 
Created

What is @storybook/react-native?

@storybook/react-native is a tool for developing and testing React Native components in isolation. It allows developers to create and showcase UI components in a structured and interactive manner, making it easier to build and maintain a consistent design system.

What are @storybook/react-native's main functionalities?

Component Story Creation

Allows developers to create stories for different states of a component, making it easier to visualize and test various scenarios.

import { storiesOf } from '@storybook/react-native';
import React from 'react';
import { Button } from 'react-native';

storiesOf('Button', module)
  .add('default', () => (
    <Button title="Default Button" onPress={() => {}} />
  ))
  .add('disabled', () => (
    <Button title="Disabled Button" onPress={() => {}} disabled />
  ));

Addons Integration

Supports various addons like knobs, actions, and links to enhance the functionality of stories, providing more interactive and dynamic component testing.

import { addDecorator } from '@storybook/react-native';
import { withKnobs } from '@storybook/addon-knobs';

addDecorator(withKnobs);

Live Component Preview

Enables live preview of components on a device or emulator, allowing developers to see changes in real-time as they modify their components.

import { getStorybookUI } from '@storybook/react-native';
import { AppRegistry } from 'react-native';
import { name as appName } from './app.json';

const StorybookUIRoot = getStorybookUI({
  asyncStorage: null,
});

AppRegistry.registerComponent(appName, () => StorybookUIRoot);

Other packages similar to @storybook/react-native

Keywords

FAQs

Package last updated on 15 Sep 2024

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