reactJS doubts and questions [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Hello guys I would like to use reactJS but it's not clear for me why do I have to use it, I already use Jquery and it works fine for me, I can use Java script and manipulate all the DOM the issue here is why? Why should i use it and what kind of things I can do with reactJS that I could not make with Jquery.
I hope you can give a hand or simple examples because I'm very confused thank you.

One of the biggest advantages is the component system for writing code. You can build all your html in blocks and then just import those blocks where you need them. You can also modify how those blocks are loaded using the component lifecycle for added control and optimisation.
These methods really help structure how you perceive information flow throughout your site.

Related

Javascript: Renaming built in functions [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
In Javascript, is it acceptable to rename built in functions. For example, in my code, I use document.querySelector() tons of times. This is extremely long and tedious to type every single time (even with autocomplete from the IDE's side). Therefore, I decided to create a new function with a shorter name like the following:
let qs = selector => document.querySelector(selector);
Is this an acceptable practice in the JS community? Is this considered bad code? If so, why? Additionally, if doing this is alright, what are some drawbacks?
Thanks.
No.
Someone is going to come behind you to edit your code.
They will then have to track down your renaming function to actually see what it does.
Create an snippet in your IDE if it’s that much of an issue for you.

Is it better to write react components first as one HTML file then turning them into components? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I wonder if writing react components as HTML first can be a good idea to plan the project or it is actually a bad idea and time consuming??
Though, this is primarily opinion based question, the react documentation simply states to follow these rules:
Start With A Mock
Break The UI Into A Component Hierarchy
Build A Static Version in React
Identify The Minimal (but complete) Representation Of UI State
Identify Where Your State Should Live
Add Inverse Data Flow
See Thinking in React for more info.

shall I use ReactJS in a web SPA App when Vanilla can do the job? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
so I have built a good performing web SPA App using Vanilla JS; the question is:
should I switch to react or continue to use vanilla when it can do the entire job smoothly?
when yes, then should I rebuild everything again with react or just use it for the new parts of the project?
thanks!
There is no point in switching.
Everything that "REACTJS" can, vanilla JS can do too.
REACTJS makes things easier, but if you're good in Vanilla, stick with it!
It can not be more powerful ;)

Adding and using Polymer in Meteor [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How does one make Polymer work in Meteor? I have tried to use atmosphere packages ecwyne:polymer-elements and ecwyne:polymer but I can't get anything working. No observable changes. No one seems to have done a tutorial on the same out there. I am definitely doing it wrong.
Would someone be kind enough to break the whole process down for a newbie? I will highly appreciate
Maybe you just forgot to add the link into your head elements.
If you want to use one polymer elements you have to add it in your <head>
I made a boiler-plate, you can have a look at it, it works (meteor+polymer), I can made a better tutoriel if I have some feedbacks, I have one with only polymer and meteor and I'm working with a version with accounts on it also.
Here are the links :
meteor+polymer Very simple, a toolbar and a menu.
meteor+polymer+accounts Still working on it, works except for socials buttons but I'm on it
meteor+polymer+accounts Same as above but from the original meteor-useraccounts team

How to get the data I need from airbnb web page? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to get the dates booked and price from the the airbnb page: https://www.airbnb.com.sg/rooms/2781352 under the "Calendar" tab of it.
I am quite newbie to this, and I want to python to do that, can I?
And what else should learn, javascript, PHP?
For extracting data from web pages, my first stop is Beautifulsoup. It is designed for just this purpose, and is excellent at it. Combine it with the great requests HTTP library (so much better and easier than urllib/urllib2/etc.) for getting the pages.
Both of these are Python modules, there is no need to learn any other programming languages to do it, although it greatly helps to have an understanding of HTML and DTDs (Document Type Definitions) for setting up paths.

Categories