Questions tagged [frontend]

The user-facing part of an application. In a desktop application this would include the windowing framework and the forms the user interacts with; in a command line program it would be the available commands and arguments; and in a web app it would refer to the HTML and JavaScript.

9513 questions
520
votes
11 answers

What is Bootstrap?

There are a lot of questions here related to Bootstrap. I see a lot of people using it. So I tried to research it, and I found the official Bootstrap site, but there was only a download section and a few words after that. Nothing that explains what…
278
votes
5 answers

Vue.js—Difference between v-model and v-bind

I'm learning Vue with an online course and the instructor gave me an exercise to make an input text with a default value. I completed it using v-model but, the instructor chose v-bind:value and I don't understand why. Can someone give me a simple…
Gustavo Dias
  • 2,901
  • 2
  • 9
  • 6
246
votes
10 answers

Insert HTML with React Variable Statements (JSX)

I am building something with React where I need to insert HTML with React Variables in JSX. Is there a way to have a variable like so: var thisIsMyCopy = '

copy copy copy strong copy

'; and to insert it into react like so, and…
Kyle Hotchkiss
  • 9,348
  • 18
  • 51
  • 81
246
votes
22 answers

Get form data in ReactJS

I have a simple form in my render function, like so: render : function() { return (
myusuf
  • 10,151
  • 8
  • 32
  • 46
151
votes
3 answers

What is {this.props.children} and when you should use it?

Being a beginner to React world, I want to understand in depth what happens when I use {this.props.children} and what are the situations to use the same. What is the relevance of it in below code snippet? render() { if (this.props.appLoaded) { …
nim007
  • 2,070
  • 3
  • 14
  • 25
135
votes
16 answers

Convert javascript array to string

I'm trying to iterate over a "value" list and convert it into a string. Here is the code: var blkstr = $.each(value, function(idx2,val2) { var str = idx2 + ":" + val2; alert(str); return str; }).get().join(", "); …
Neo
  • 10,789
  • 17
  • 50
  • 78
131
votes
19 answers

When should I use Inline vs. External Javascript?

I would like to know when I should include external scripts or write them inline with the html code, in terms of performance and ease of maintenance. What is the general practice for this? Real-world-scenario - I have several html pages that need…
Dan Burzo
  • 9,145
  • 18
  • 44
  • 67
123
votes
8 answers

how to install multiple versions of package using npm

Due to https://github.com/npm/npm/issues/2943, npm will never support the ability to alias packages and install multiple versions of the same package. The workarounds posted on the github issue might work for pure-JS modules, but as npm becomes a…
mark
  • 3,429
  • 7
  • 30
  • 42
112
votes
2 answers

What are the most common font-sizes for H1-H6 tags

I've always been unsure of where to start as a general best practice baseline. Yes, I know it depends on your design, but what's most common? Here's what I currently have as a starter: h1 { font-size: 24px;} h2 { font-size: 22px;} h3 { font-size:…
rsturim
  • 6,388
  • 14
  • 43
  • 58
109
votes
21 answers

nodemon command is not recognized in terminal for node js server

I am doing node.js server setup from https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens. I am new in node.js. I am installing npm install nodemon --save. But when I am run the server with this nodemon server.js. In the…
Varun Sharma
  • 3,782
  • 7
  • 37
  • 84
108
votes
4 answers

How to go to a specific file in Chrome Developer Tools?

I am developing a web application with a heavy front-end approach. By using Dojo and the AMD-way, I currently have testing screens which may easily load over a hundred different javascript files. When I want to debug for any specific problem, or…
Alpha
  • 6,876
  • 8
  • 55
  • 87
98
votes
4 answers

setState vs replaceState in React.js

I am new to React.js Library and I was going over some of the tutorials and I came across: this.setState this.replaceState The Description given is not very clear (IMO). setState is done to 'set' the state of a value, even if its already set in…
myusuf
  • 10,151
  • 8
  • 32
  • 46
98
votes
3 answers

Ember.js or Backbone.js for Restful backend

I already know that ember.js is a more heavy weight approach in contrast to backbone.js. I read a lot of articles about both. I am asking myself, which framework works easier as frontend for a rails rest backend. For backbone.js I saw different…
Robin Wieruch
  • 10,245
  • 6
  • 68
  • 90
93
votes
2 answers

Is there a callback on completion of a CSS3 animation?

Is there any way to implement a callback function in case of css3 animation? In case of Javascript animation its possible but not finding any way to do it in css3. One way I could see is to execute callback after the animation duration but that…
alter
  • 4,090
  • 6
  • 29
  • 35
90
votes
9 answers

How to check if Twitter bootstrap is loaded?

How can I check whether there is a bootstrap.js file loaded on a page (the bootstrap.js file itself may be compiled into another big JS file)?
Igor
  • 2,506
  • 1
  • 22
  • 40
1
2 3
99 100