Javascript Code Samples



Filters


Pass Data/Properties from child to parent in react js
harika | 1 year, 1 month
//Parent.js
import React from "react";
import Child from './Child'
Check by Parent.js,Place both in the same location and test. Happy Coding :-)
javascript react js
Create a React app without webpack and Create-react-app
harika | 1 year, 2 months
//Basic way
<!DOCTYPE html>
<html>
javascript react js webpack
Work with 3rd party css libraries in react framework
harika | 1 year, 2 months
import React from 'react'
//No need to give the complete path, react framework internally searches 
javascript react js
Difference between state and stateless components in react js
harika | 1 year, 2 months
//State Component
<!DOCTYPE html>
<html>
Stateless Component : A pure dumb component just process the request on the set of properties and re
javascript react js
work with react without node installation in html
harika | 1 year, 2 months
//Basic way
<!DOCTYPE html>
<html>
javascript react js html
Compress files synchronously in javascript
harika | 9 months, 3 weeks
const tar = require('tar');
  tar.c(
    {
try to install 'tar' using npm and then try. Happy Coding :-)
node js javascript react js
Adjust browser height and width according to device / Screen height and width in electron app
harika | 8 months, 2 weeks
import electron from 'electron';
const screenElectron = electron.screen;
const mainScreen = screen
Add the piece of code while creating window in main.js and check the difference. Happy Coding :-)
javascript electron js
Run Java script code Synchronously inside a function with promises
harika | 1 year, 2 months
async function showAvatar() {

  // read our JSON
JavaScript follows Asynchronous way of running code when this comes to promises. If we give Async-Aw
javascript
Import any class irrespective of default exports
harika | 1 year, 2 months
import React, { Component } from 'react'
Small explanation to understand correctly In the external js file React has been tagged with expor
javascript react js
Check whether the file node is a directory or a plain file object
harika | 11 months, 2 weeks
//fs is a built in node module
const fs = require('fs');
const filePath = "/home/Desktop"
javascript node js
Next