25 DEC 2019

react redis redily

react.png

What is NPX?

npx is a Node.js command-line tool which became available with npm@5.2.0. It enables npm to eXecute command-line Node.js tools without having them to be installed globally.

Command-line tools like mochagulpreact-native etc., are commonly installed globally using the -g flag with npm.

However, a globally installed package has two major problems:

  • Different projects may depend on different versions of the same package
  • Users may be reluctant to install a global utility just for your project

When using npx, all you have to do is install the “global” command-line tool under your dependencies or devDependencies, it can then be executed within the context of the project directory using npx, without them actually being installed globally.

… full article

Create React App  PRs Welcome

Create React apps with no build configuration.

Quick overview:

npx create-react-app my-app
cd my-app
npm start

Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.

… full article

Nested Components

Nested Components are exactly what the name implies. They are children nested inside parent components. They simply help us create more complex UI structures. For example, an alert component probably has another sub-component nested within it to indicate the actual number of alerts. A message box has an inner input element and a send button.

Nested components simplify complex applications. In this coding challenge, let’s build a truck wheel manager application. I followed this modular approach to nest wheels inside axles, and nest axles within the truck frame (see image to the right.) Both wheels and axles could then be dynamically added or deleted from the UI, offering flexibility in defining different types of vehicles (trailer, semi, bus, etc.)

… full article

Props

In React props is short for properties. They are single values or objects containing a set of values that are passed to React Components on creation using a naming convention similar to HTML-tag attributes.

The primary purpose of props in React is to provide following component functionality:

  • Pass custom data to your React component.
  • Trigger “state” changes (more on this later).
  • Use via this.props.reactProp inside component’s render() method

… full article

What is Cache memory?

In computing, a cache is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere. A cache hit occurs when the requested data can be found in a cache, while a cache miss occurs when it cannot. Cache hits are served by reading data from the cache, which is faster than recomputing a result or reading from a slower data store; thus, the more requests that can be served from the cache, the faster the system performs.

To be cost-effective and to enable efficient use of data, caches must be relatively small. Nevertheless, caches have proven themselves in many areas of computing, because typical computer applications access data with a high degree of locality of reference. Such access patterns exhibit temporal locality, where data is requested that has been recently requested already, and spatial locality, where data is requested that is stored physically close to data that has already been requested.

… full article

redis

Redis Cache is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster

redis.io home page – link

redis.io for windows – download page

redily2

Redily is a modern Redis GUI Client built to improve developer productivity

redily – home page download

More topics covered:

  • overcome create-react-app issue
  • this.props can with different parameter
  • cache memory for data-base
  • Why use cache memory?
  • servicestack.redis nugget
  • redis-cli.exe
  • redis-server.exe

Links:

 

Design a site like this with WordPress.com
Get started