JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Feb 26, 2019 21:08
yeoman.io: "capture their own boilerplates and easily re-use them and so on". I think this was exactly what I was looking for but it doesn't have a real term associated with it I guess besides "own boilerplate".
Feb 26, 2019 20:56
If so, is yeoman still the best option for scaffolding?
Feb 26, 2019 20:56
I just checked the documentation for create-react-app. I feel like yeoman is what I'm looking for. I remember back in the day Polymer-Project used a command "like" yo polymer comp and it would generate a folder structure for a component (not a project structure). So maybe scaffolding is what I want?
Feb 26, 2019 20:51
Less so of the scaffolding I think - I don't need a project structure generated at the moment(if that's what it is). I'm just trying to simplify my process of having to make a component folder so often.
Feb 26, 2019 20:49
I'm new to the terms, let me look up scaffolding
Feb 26, 2019 20:48
I was thinking yeoman.io? But it looks like it hasn't had any blog posts in 3 years and the github seems dead . . .
Feb 26, 2019 20:48
Does anyone know of a templating system that's relevant &or maintained? Something that can take a boilerplate folder for a component structure and place it somewhere else? Mine basically(will*) just copies a folder structure and anything with {name-here text-filter} will be replaced accordingly . . .
Feb 25, 2019 20:50
Not allowed to ask for upvotes? Surely there's a loophole in the system! hahaha- joking.
Feb 24, 2019 22:04
I'm thinking as an added safety measure I could also use state to prevent unnecessary creations of DOM elements.
Feb 24, 2019 21:53
The reason I'm doing this is for an embedded iframe using YouTube's api
Feb 24, 2019 21:51
Would React update that exact component, BadIdea, if it has no props or state? I thought React doesn't touch anything unless it explicitly requires an update... I suppose it would re-render BadIdea if somewhere up the tree the reference to BadIdea was lost. But perhaps putting a "key" on the item would tell React to be more careful with it.
Feb 24, 2019 21:48
Thank you, david.

Would this be my best option if I had no choice but to append a Dom-element into a React-element?
Feb 24, 2019 21:46
I formatted it this time using ctrl + k ...
Feb 24, 2019 02:20
@KevinB whats your avatar? Reminds me of like a manta
Feb 19, 2019 22:03
@rlemon thank you.
Feb 19, 2019 21:50
Quick question: do you experts stay away from proposed code, like static properties, or just use them? I saw an answer using static propTypes = { ... } but babel failed to compile it because it was only a proposal.
Mar 20, 2018 08:23
Can you sandbox the system access they have? Like writing/reading files?
Mar 20, 2018 08:18
I use Monkey2 and it's perfect for my needs - though it will never be a language used by businesses
Mar 20, 2018 08:17
Hell . . . I'll use any language if it has a nice way to make games
Mar 20, 2018 08:15
groovy seems like a nice language 😄
Mar 20, 2018 08:12
That's interesting, saw you can have symbols which have spaces like: 'a function name' or maybe im confusing it with something else
Mar 20, 2018 08:08
Similar to what javascript can do, right? Except without the necessary "this"?
Mar 20, 2018 08:07
Oh wow
Mar 20, 2018 08:07
:D the website looks . . . groovy? Hahaha. It does look fresh! I'd be fooled thinking it wasn't a commonly used language
Mar 20, 2018 08:04
- suddenly sees "eclipse games"
Mar 20, 2018 08:04
@ndugger do you do any game dev?
Mar 20, 2018 08:02
Yeah vastly different goals, but vaguely similar outcomes
Mar 20, 2018 08:01
What would you classify Haxe as? I'd say it's lively, but there are no real jobs with it, and it's got a small community
Mar 20, 2018 08:00
xD I have no doubt of that
Mar 20, 2018 07:58
We'll see ! :)
Mar 20, 2018 07:58
Haha
Mar 20, 2018 07:57
Dart is special in this case I think, it still has active projects going on which bring life to it . . I think it has a chance to comeback. Languages that were dead in the past always have the chance to come back, you know what I'm saying? I'll call it dead for now then
Mar 20, 2018 07:56
But I feel like even if it is dead, it's just bursting with potential and it's uncertain what if in the future it will "remain" dead
Mar 20, 2018 07:55
I can agree on that
Mar 20, 2018 07:55
I know for sure it's not commonly used
Mar 20, 2018 07:55
I want to believe that Dart is not dead
Mar 20, 2018 07:54
no
Mar 20, 2018 07:54
Is lua dead
Mar 20, 2018 07:52
Lol how to win arguments 101
Mar 20, 2018 07:51
that's real appealing
Mar 20, 2018 07:51
for real
Mar 20, 2018 07:51
Have you seen flutter though
Mar 20, 2018 07:50
lol
Mar 20, 2018 07:50
Dart is alive, okay guys don't hurt my feelings
Mar 20, 2018 07:50
A lot of things may not be used as much, but even Angular.js isn't dead
Mar 20, 2018 07:49
Looking at it's repo, I'd say it's very much alive
Mar 20, 2018 07:48
But Google obviously sees it's potential, and Flutter is probably going to bring it back to life for mobile dev
Mar 20, 2018 07:47
Yeah, as a job language it's dead
 

Trash can

Like the recycle bin, but trashier.
Feb 24, 2019 21:46
If I have no choice but to append a document element into a react element, would this be my best option?

function BadIdea(){
let element = document.createElement("p");
element.appendChild( document.createTextNode("bad idea!") )

return <div ref={r=> r.appendChild(element)} />;
};
Feb 24, 2019 21:44
If I have no choice but to append a document element into react, would this be my best option?
```
function BadIdea(){
let element = document.createElement("p");
element.appendChild( document.createTextNode("bad idea!") )

return <div ref={r=> r.appendChild(element)} />;
};
```