Comments (9)
from pup.
How big is your bundle? Have you check with bundle-visualizer? Have you tried dynamic imports? If you get your client bundle down to 2.5MB (or less) you should be in good shape with load times.
My app has a bundle of 4MB and it takes two or three seconds to load on a new device.
from pup.
I also got my bundle size split by half in two minutes just by using react-loadable
in layouts/App/index.js
I replaced most of the regular components imports by Loadable Components here is an example
const AdminUsers = LoadableComponent(() => import('../../pages/AdminUsers'));
import Loadable from 'react-loadable';
import Loading from '../components/Loading';
const LoadableComponent = (dynamicImportFunction) =>
Loadable({
loader: dynamicImportFunction,
loading: Loading,
});
export default LoadableComponent;
it is a no brainer and can drastically reduce your bundle size.
IMHO this should be enabled by default on pup, why the heck do I load an admin component if the user is just looking and the home page?
from pup.
Happy to work this in
from pup.
@cleverbeagle Thank you so much Ryan. Also plz don't forget the client side Redux integration for those that want to use Redux on the client side (not just server side) in pup v2 by default.
Looking forward to any updates on this :). Super appreciative of your efforts to creating the best tools out there.
from pup.
@cleverbeagle Plz do let us know when you have any updates on this :)
from pup.
@ayhid , in reference to your comment (#336 (comment)) -- Were you able to get this working successfully on a cleverbeagle pup v2 based project without any issues?
from pup.
from pup.
@pagesrichie stay tuned :)
from pup.
Related Issues (20)
- Real-time updates HOT 6
- How to Connect to a react native app with pupql HOT 4
- compose is not a function HOT 3
- Update Apollo Client and Apollo Server Usage HOT 4
- Application stuck when trying to run. HOT 4
- checkIfBlackListed does not work as expected! HOT 4
- Paste true may be necessary on e2e tests login helper
- Access Meteor settings file from Jest? HOT 2
- graphQL httpUri on staging and production settings HOT 1
- How to upgrade from v1-> v2 HOT 3
- Add License File
- Wildcard instead of GraphQL? HOT 3
- Upgrade to latest version of alanning:roles HOT 1
- is this repo still maintained? HOT 9
- Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3000/graphql. (Reason: CORS request did not succeed). HOT 5
- Adding gql property to type user HOT 4
- Password only oauth possible? HOT 9
- Pup is moving!
- Apollo version and hooks 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 pup.