Voting app feedback, please!

Hi there! Please have a look at my voting app. Please review it. Feel free to criticize!

src code

ps: now - after adding few styles and social buttons - the bundle.js file loads terribly slow… Can’t figure out why?(about 15 sec - before was about 2-5 sec)

Hi @kurumkan

Very nice, I’m loving the design and layout, very clean. Did you use a CSS framework?

One thing I thought of, perhaps you could make the whole box containing the poll name and created date the link to the poll, rather than just the name itself?

As for the slow loading, I took a look at the bundle size and its 7mb, which is quite high, did you minify the bundle?

1 Like

Just had another look at the webpack config / bundle and I think a found the problem with the size.

You’re using a type of source map that isn’t supported for production, and is subsequently generating many hundreds (probably thousands) of extra characters, have a look at:

If you want to generate a source map, I recommend using: devtool: 'source-map', which will generate a separate .map file. If not, just remove the devtool option from your webpack config. Either way this should reduce the bundle size significantly.

1 Like

thank you very much! very important note! I still don’t know a lot about react. Will make research and fix=)

your notes helped me a lot. The bundle changed significantly (from 7mb to 500 kb). But I still think it’s too large. Looking for other ways to reduce bundle size

That’s not too bad actually, for comparison my voting apps bundle is 400kb.

I did notice that your providing jQuery in your webpack config, however, I can’t find one single instance where you use it in your source code, although, I only skimmed it so correct me if I’m wrong.

If your not using it, I recommend removing it from the config and seeing if that reduces the size anymore.

Yes. You are right. For now there is no usage of jquery in the project. I want to use jquery for my tests(I add it later). Did you try preact? I also tried few things mentioned in the article. May be someone will find it useful,

1 Like