@balajive
software engineer
Nothing here yet.
Nothing here yet.
No blogs yet.
I would suggest picking up a boiler plate . It provides a tested code for you to get started with .It saves you a lot of time in scaffolding your app . I work for a company that uses react extensively . One of our developers made this https://github.com/praneshr/smart-react-boilerplate .This is one such boilerplate that you can try out . You can also try out yeoman generator . http://yeoman.io/
Here are some problems A)Any variables declared in the eval code can pollute the lexical scope . It might shadow the variables that are declared outside the eval as well . It creates global variables and pollutes the scoping model B)the code is hard to debug C) Your code becomes slow . Javascript compiler initially does a single pass compilation before running the code . However in case of eval it is compiled and run only in the run time D)Any malicious code can end up being "eval" ed Alternatives to eval : https://www.npmjs.com/package/vm
You can import only .ts or .tsx file using typescript imports This can be done in two ways: a)if you want to import JSON you may have to use "require" b) Copy the json and assign the JSON to a varaible and store it in a .ts file . In this case the variable will hold the json object . You can now import this .ts file using typescript type of imports and start using the object
Nightmare.js, horsemanjs for node any of the headless browsers can also be used https://github.com/dhamaniasad/HeadlessBrowsers Apart from these https://scrapy.org/ provides some good tools for the above purpose. Auto web extractor library helps you to parse any web page into structured data. You can find more details about this library on https://github.com/indix/web-auto-extractor