Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple placeholder with animation #68

Open
k4mr4n opened this issue Mar 26, 2018 · 2 comments
Open

Multiple placeholder with animation #68

k4mr4n opened this issue Mar 26, 2018 · 2 comments

Comments

@k4mr4n
Copy link

k4mr4n commented Mar 26, 2018

Hello
how can I have multiple placeholder to point out the list view?
the way I achieved this:
screen.js

isLoading ? [...Array(5)].map((o, i) => (<LoadingComponent key={i} />)) : (<List />)

and in LoadingComponent (actual code is more complicated):

<div style={styles.wrapper}>
    <ReactPlaceholder type='rect' showLoadingAnimation />
    <ReactPlaceholder type='text' showLoadingAnimation />
</div>

the problem here is I wanted to have an animation so I used ReactPlaceholder instead of RectShape or TextBlock, so I encounter warning:
The prop `ready` is marked as required in `ReactPlaceholder`
and
The prop `children` is marked as required in `ReactPlaceholder

@k4mr4n
Copy link
Author

k4mr4n commented Mar 26, 2018

I could pass null as a child and ready={false} but is there any better solution here?

@m-salamon
Copy link

I had the same issue, was wondering the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants