Node / React cheat sheet

Node / React cheat sheet

Create a react application c:\ npx create-react-app my-app If the creation of react app is generating error like ‘Unexpected end of JSON input while parsing near …’ c:\ npm cache clean –force Correct way of updating the state variable this.setState((state, props) => ({ counter: state.counter + props.increment })); this.setState(function(state, props)...Read more
Initial references for creating a NodeJS and React application

Initial references for creating a NodeJS and React application

Below are few code snippets and links that are helpful when you start developing a NodeJS application. Ref: https://gist.github.com/gaearon/683e676101005de0add59e8bb345340c If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation: We define variables with let...Read more
Optimize Oracle Database

Optimize Oracle Database

Overtime, the Oracle DB will become sluggish with the insert/update/deletes. So we need to optimize the DB so that the queries are faster. To optimize a single table, use the following command: exec DBMS_STATS.GATHER_TABLE_STATS (ownname => ‘&schema’ , tabname => ‘&tabname’, cascade => true); To optimize a single schema and...Read more