Comments (2)
@richardscarrott Thanks for your answer. Now I'm embarrassed. How could I overlook something so obvious.
Thanks again for your boilerplate-code.
from react-boilerplate.
@kyusu ah yes, this is because react-router is mocked within src/__mocks__/react-router.js
so Link
and Router
actually just export the string 'Link' and 'Router'...this even caught me out at first!
The thinking behind mocking react-router
's components was I like to effectively shallow render components by mocking non-built-in components but still use react-test-renderer
for jest snapshots.
If you prefer not to use jest snapshots or are happy to take snapshots of deep trees then you can just delete src/__mock__/react-router.js
.
from react-boilerplate.
Related Issues (20)
- Use prettier without eslint
- Remove webpack root resolve
- Boilerplate with react-loadable v5
- Improve API DX HOT 3
- Consider moving env vars into redux store HOT 1
- Add tests for webpack config HOT 1
- Upgrade to Webpack 2 HOT 2
- Add prettier HOT 1
- Revert testEnv back to jsdom and use docblock to define node in webpack config tests
- Sync up react-router-redux server side HOT 1
- Add vendor chunk
- Use store.replaceReducer to split reducers
- Upgrade router
- Deploy demo to github pages HOT 2
- Avoid serving server bundle HOT 1
- Include markdown file documenting component folder structure
- Use flushWebpackRequireWeakIds from react loadable HOT 1
- duplicate dependencies HOT 1
- Richard what's your recommended devtool to get line mappings on the server? HOT 2
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 react-boilerplate.