Cache busting with webpack not working

After I build my app with gulp, I don't see the hashes on my index.html that cache busting should provide. In my webpack config file I have: var WebpackMd5Hash = require('webpack-md5-hash'); ... var prodPlugins = [ new WebpackMd5Hash(), new we...
more »

2017-01-11 23:01 (0) Answers

PCI compliance (PCI DSS) for Front End

I'm are currently working on the project and one of its feature is e-commerce such that our system should take care of security for user's credit card information and other credential information. I know that any web service that deals with user's ...
more »

2017-01-11 23:01 (1) Answers

Why does Math.min([]) evaluate to 0?

Why does Math.min([]) evaluate to 0? I would expect that it would evaluate to NaN since MDN's manpage for Math.min states "If at least one of the arguments cannot be converted to a number, NaN is returned." So I guess the refined question is why do...
more »

2017-01-11 22:01 (2) Answers

Using react-router with Express server

I have a React app that is being served by a simple Express server. The React app is being webpack'd into a directory called dist in my root directory (where the server.js file is located as well). The dist folder includes the index.html entry point,...
more »

2017-01-11 21:01 (1) Answers

Validating multiple user generated tags in Laravel

On my website, I allow users to upload images. Alongside these images, users can also add tags to the images. Fiddle demo found here: I have two problems with this, however. First, how could I even pass this throug...
more »

2017-01-11 21:01 (2) Answers

JS function parameter outer environment

I have a question regarding the outer environment in JS. Suppose I have the code like this: function callbackTest(callback) { var a = 1; callback(); } callbackTest(function() { console.log(a); }); The brower told me that a is not defined. It...
more »

2017-01-11 19:01 (3) Answers

React dynamically set custom tags

Rather than having to create a component per custom header type, I would like to do so dynamically. const HEADERS = { 'header-one': 'h1', 'header-two': 'h2', 'header-three': 'h3', 'header-four': 'h4', 'header-five': 'h5', }; _ let ...
more »

2017-01-11 18:01 (1) Answers

Set Prop Key Dynamically JSX

I'm wondering if it's possible to do the following in JSX (this code does not work, just an example of what I'm trying to do): const propKey = 'someProp'; const jsx = <MyComponent [propKey]="some value" />; // evaluates to <MyComponent some...
more »

2017-01-11 16:01 (2) Answers

Proxify websocket requests in Sails.js

We use React for the UI of our app and Sails.js back-end for managing users authentication and authorization. Also thanks to Sails we hide all API requests (those are made from React) to our external servers and we make sure that the requests are mad...
more »

2017-01-11 16:01 (0) Answers

Input fields needing mouse click

I'm building a simple HTML page, and I have an input field followed by a search button; this is the code: <input type="text" id="sfield" placeholder="Write something"> <button id="search">Search!</button> I'm currently writing th...
more »

2017-01-11 16:01 (1) Answers

Add dynamic form validation callback to field

I am using and need to dynamically add a callback type validator within a class so that it can use a class property. The issue is that I initially pass my validator options into a super call that has some form validation procedures....
more »

2017-01-11 16:01 (1) Answers

Save data async

I want to store the values from 2 text inputs in my phone and use the data after. I'm trying to save the data but there is only one character stored... can someone explain to me why please? import React, { Component } from 'react'; import { Touc...
more »

2017-01-11 14:01 (2) Answers

Regex on Chrome pattern input validation

I have an RFC 5322 compliant email regex pattern to validate my input. This works in all browsers, but Chrome show me the following error on console: Pattern attribute value ^[-a-z0-9~!$%^&*_=+} {\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_...
more »

2017-01-11 14:01 (1) Answers

JavaScript function composition from 3 functions

I'm using Vue and trying to filter an array of results using a JS function composition. My Vue computed values are like so, but can't get filteredByAll to accept a third option getByThing. Right now the filterByAll just filters on the category and k...
more »

2017-01-11 12:01 (1) Answers