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

Also resolve JSX files #60

Closed
wants to merge 1 commit into from
Closed

Also resolve JSX files #60

wants to merge 1 commit into from

Conversation

tupy
Copy link

@tupy tupy commented Apr 6, 2016

Allow to import react components from files with .jsx extensions. For instance, import components defined in index.jsx.

$ ls components
compA/index.jsx
compB.jsx
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { CompA } from '../components/compA';

storiesOf('CompA', module)
  .add('default', () => (
      <CompA />
  ));

Also, it's useful for transitive dependency:

// compA.jsx
import CompB from "../compB"

class CompA extends React.Component {
  render() {
    return (
      <CompB />
    )
  }
}

@arunoda
Copy link
Member

arunoda commented Apr 6, 2016

I don't think this should be default. We will soon allow much better configurations with custom webpack config file.
See: #46 (comment)

With that, I think this is pretty straight-forward.

@arunoda
Copy link
Member

arunoda commented Apr 6, 2016

We just accept #64 and now you can add your own resolve config to the webpack config file at .storybook

@arunoda arunoda closed this Apr 6, 2016
@tupy
Copy link
Author

tupy commented Apr 6, 2016

👏

@tupy tupy deleted the patch-1 branch April 6, 2016 20:31
ndelangen pushed a commit that referenced this pull request Apr 5, 2017
Support older react-native versions
ndelangen pushed a commit that referenced this pull request Apr 5, 2017
The render function of a React component has to be pure. But WrapStory render function called storyFn. Which could be not pure. Because it could take data from anywhere and also may render other components. Like the case in #60

This fixes #60
ndelangen pushed a commit that referenced this pull request Apr 5, 2017
ndelangen pushed a commit that referenced this pull request Apr 11, 2017
ndelangen pushed a commit that referenced this pull request Apr 23, 2017
ndelangen pushed a commit that referenced this pull request May 25, 2017
@shilman shilman added the misc label May 27, 2017
Copy link

nx-cloud bot commented Mar 17, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit e11cac3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

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

Successfully merging this pull request may close these issues.

3 participants