Comments (8)
This doesn't seem to be relevant to this repo at all. It's not actionable so closing...
from babel-plugin-react-transform.
@thejameskyle should I post it on react router? It's a project used by most react devs and unless I'm wrong doesn't currently work with this transform tool which seems like a huge issue.
from babel-plugin-react-transform.
Provide something that shows this babel plugin breaking react router and I'll reopen
from babel-plugin-react-transform.
@thejameskyle https://github.com/jonstuebe/react-transform-boilerplate
from babel-plugin-react-transform.
Okay... now can you make that a more reduced test case? Theres a whole lot of noise in that repo and I'm not going to go through all of it
from babel-plugin-react-transform.
The specific command is npm start
. I stripped down most of the code so it's really just the <RouterContainer>
being rendered with only one component inside of it: <App>
. All the rest of the code in the repo hasn't been touched.
from babel-plugin-react-transform.
The problem in your code is incorrect usage of import
and export
.
You use export default
for App
and RouterContainer
, but later you use named imports:
// RouterContainer.js
// import { App } from './App'; <--- wrong way to import a default export
import App from './App'; // <--- what it should be
// index.js
// import { RouterContainer } from './RouterContainer'; <--- wrong way to import a default export
import RouterContainer from './RouterContainer'; // <--- what it should be
This is a very good guide explaining the difference between default and named exports.
That said I don't quite understand why this issue was filed in this repository. If you turn off this Babel plugin the issue stays exactly the same. Therefore it's unrelated, and it would've been best to ask on StackOverflow rather than in an unrelated repository. :-)
I hope this helps!
from babel-plugin-react-transform.
Makes sense. Thanks!
from babel-plugin-react-transform.
Related Issues (20)
- Local path as an argument to "transform" does not resolve the path.
- Modify the contents of the function will not be updated.
- Doesn't work with React.PureComponent HOT 1
- Template is not a function
- Deprecated with no alternative? HOT 1
- no release info or changelog for 3.0.0
- `addImport()` is deprecated in Babel 7 HOT 2
- Use without .babelrc HOT 4
- jspm with plugin-babel and react preset: "cannot read property 'transform' of undefined" HOT 1
- React transforms being run on Backbone views HOT 6
- Question: Is it a bad practice to use react-transform for production code? HOT 1
- Transform(s) to strip propTypes and displayName HOT 4
- Ember objects detected as react components HOT 5
- Appears to wrap other functions than createClass() HOT 10
- error when passing properties to createClass() HOT 4
- Future of React Transform HOT 2
- Can we have superClass Regexp matching option , for inheritance ? HOT 2
- undefined value static properties outside class HOT 3
- displayName equals 'Constructor' HOT 8
- static properties are undefined HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-react-transform.