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

Errors logged by official-storybook #3679

Closed
tmeasday opened this issue May 29, 2018 · 9 comments
Closed

Errors logged by official-storybook #3679

tmeasday opened this issue May 29, 2018 · 9 comments
Assignees
Labels
bug maintenance User-facing maintenance tasks

Comments

@tmeasday
Copy link
Member

@ndelangen I'm creating an issue recording what I find here.

"Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail."

This is due to switching certain UI components from classes to SFCs. The actually use of the ref comes on this line of react-komposer:

https://github.com/storybooks/react-komposer/blob/975fa67f07ca75f889ae2161b047b4d7037fa013/src/compose.js#L126-L128

I'm not sure if that ref is ever used (perhaps @Hypnosphi remembers something) but if I pass { withRef: false } as a second argument to compose() here and here the error goes away (and the UI still appears to work).

Warning: Unsafe lifecycle methods were found within a strict-mode tree

This issue: emotion-js/emotion#644

Plus similar problems with react-split-pane (our issue and react-modal (reactjs/react-modal#649), et al (Velocity also)

@tmeasday tmeasday added the maintenance User-facing maintenance tasks label May 29, 2018
@merlinstardust
Copy link

I'm getting the bug: Stateless function components cannot be given refs. Attempts to access this ref will fail. as well. This happened after I decided to upgrade to the v4 alpha

It further says to check the following spots

  • Check the render method of Container(Layout).
  • Check the render method of Container(AddonPanel)

So far, everything seems to be working despite the bug.

@ndelangen
Copy link
Member

"Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail." is being fixed right now on the theming branch

@ndelangen ndelangen mentioned this issue Jun 4, 2018
5 tasks
@igor-dv
Copy link
Member

igor-dv commented Jun 4, 2018

BTW, It happens on every app, because of the manager.

@stale
Copy link

stale bot commented Jun 25, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jun 25, 2018
@marvinhagemeister
Copy link

Comment to keep this issue open. We just ran into it with v4.0.0-alpha10.

@stale stale bot removed the inactive label Jun 26, 2018
@gnomeontherun
Copy link

It happens with using Angular at 4.0-alpha10 as well

@shiftsave
Copy link

seeing this issue still trying to incorporate an emotion theme decorator:

import React from 'react';
import { storiesOf } from '@storybook/react';
import { Button } from './Button';
import { ThemeProvider } from 'emotion-theming';
import { theme } from '../../constants/theme';


const Theme = storyFn => (
    <ThemeProvider theme={theme}>{storyFn()}</ThemeProvider>
);

storiesOf('Components/Button', module)
    .addDecorator(Theme)
    .addWithJSX('primary', () => (
    <Button>I am a Button</Button>
));

@igor-dv
Copy link
Member

igor-dv commented Aug 28, 2018

It's not happening anymore.

@igor-dv igor-dv closed this as completed Aug 28, 2018
@issue-sh issue-sh bot removed the in progress label Aug 28, 2018
@shiftsave
Copy link

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug maintenance User-facing maintenance tasks
Projects
None yet
Development

No branches or pull requests

7 participants