Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed actual_app_home.png
Binary file not shown.
Binary file removed actual_app_home_15sec.png
Binary file not shown.
Binary file removed coin_flip_heads.png
Binary file not shown.
Binary file removed my_feature.png
Binary file not shown.
10 changes: 1 addition & 9 deletions packages/rn-storybook-auto-screenshots/src/StoryRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { View, Text, StyleSheet, NativeModules, NativeEventEmitter } from 'react-native';
import { View, Text, StyleSheet, NativeModules } from 'react-native';
import { storyNameToId } from './utils';

const { StorybookRegistry } = NativeModules;
Expand Down Expand Up @@ -60,14 +60,6 @@ export function StoryRenderer({ storyName = 'MyFeature/Initial' }: StoryRenderer
const [error, setError] = useState<string | null>(null);
const [loading, setLoading] = useState(true);

useEffect (() => {
const emitter = new NativeEventEmitter(NativeModules.StorybookRegistry);
const sub = emitter.addListener('loadStory', (name: string) => {
console.log('loadStory event received:', name);
});
return () => sub.remove();
}, []);

// Notify native after React's commit phase so the test thread can proceed to screenshot.
useEffect(() => {
if (!loading) {
Expand Down
Binary file removed simple_text_view.png
Binary file not shown.
Binary file removed simple_text_view_latest.png
Binary file not shown.
Binary file removed switch_feature_enabled.png
Binary file not shown.
Binary file removed timer_paused.png
Binary file not shown.
Binary file removed timer_paused_1000x1000.png
Binary file not shown.
Binary file removed timer_paused_600x500.png
Binary file not shown.
Binary file removed timer_paused_800x600.png
Binary file not shown.
Binary file removed timer_paused_at_most.png
Binary file not shown.
Binary file removed timer_paused_container_800x800.png
Binary file not shown.
Binary file removed timer_paused_final.png
Binary file not shown.
Binary file removed timer_paused_fixed.png
Binary file not shown.
Binary file removed timer_paused_full.png
Binary file not shown.
Binary file removed timer_paused_latest.png
Binary file not shown.
Binary file removed timer_paused_manual_layout.png
Binary file not shown.
Binary file removed timer_paused_match_parent.png
Binary file not shown.
Binary file removed timer_paused_no_layout_params.png
Binary file not shown.
Binary file removed timer_paused_setExactWidthDp.png
Binary file not shown.
Binary file removed timer_paused_unspecified.png
Binary file not shown.
Loading