undefined is not iterable (cannot read property Symbol(Symbol.iterator)) #11756
-
I have made a React library using https://tsdx.io & chose the React + TypeScript + Storybook template. The entire code is here → https://github.com/deadcoder0904/react-typical I get this error:
Not sure how I can get rid of it? My storybook file import React from 'react';
import { ReactTypical, Props } from '../src';
export default {
title: 'Basic',
steps: [
'Hey',
5000,
'you',
5000,
'have',
5000,
'a',
5000,
'blessed',
5000,
'day',
],
loop: Infinity,
};
// By passing optional props to this story, you can control the props of the component when
// you consume the story in a test.
export const Default = (props: Props) => <ReactTypical {...props} />; Anyone got any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 18 replies
-
Fixed your stories: const props = {
steps: [
'Hey',
5000,
'you',
5000,
'have',
5000,
'a',
5000,
'blessed',
5000,
'day',
],
loop: Infinity,
};
export const Default = () => <ReactTypical {...props} />; |
Beta Was this translation helpful? Give feedback.
-
Alright I solved it like this: import React from 'react';
import { ReactTypical, Props } from '../src';
export default {
title: 'Basic',
};
export const Default = (props: Props) => {
return (
<ReactTypical
{...props}
steps={[
'Hey',
500,
'you',
500,
'have',
500,
'a',
500,
'blessed',
500,
'day',
]}
/>
);
}; |
Beta Was this translation helpful? Give feedback.
Alright I solved it like this: