Skip to content

Instantly share code, notes, and snippets.

@dwilt
Last active July 29, 2016 14:18
Show Gist options
  • Save dwilt/605aa6ca4257d8a9615979fdaa82f405 to your computer and use it in GitHub Desktop.
Save dwilt/605aa6ca4257d8a9615979fdaa82f405 to your computer and use it in GitHub Desktop.
export const functionToImport = () => {
// I had an old reference to a class method that was in this file previously
// React never consold an error but I saw the warning `Did not expect componentDidMount timer to start while render timer is still in progress for another instance`
// luckily I had few very changes in my working directory, so I didn't spend too much time trying to find the culprit
var x = this.something();
return x;
}
import React, {
PropTypes
} from 'react';
import {
Text
} from 'react-native';
import { functionToImport } from './badImport.js';
var MyComponent = () => {
// you must call the imported function for the warning to fire!
return (
<Text>{ functionToImport() }</Text>
)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment