emptygif
ભાષા: ગુજરાતી

બધી ભાષાઓ અને ફ્રેમવર્ક

React component (JSX) JavaScript

React component (JSX) માટે JavaScript સ્નિપેટ, જે /pixel.gif પરની રિક્વેસ્ટનો જવાબ empty GIF થી આપે છે. GIF સ્ટાર્ટઅપ વખતે એક જ વાર ડિકોડ થાય છે.

React component (JSX) JavaScript

ફાઇલ
Spacer.jsx
const EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';

export function Spacer({ width = 1, height = 1, ...props }) {
  return <img src={EMPTY_GIF} width={width} height={height} alt="" aria-hidden="true" {...props} />;
}

અમે આ સ્નિપેટ ચલાવ્યો અને તેણે પરત કરેલા બાઇટની સરખામણી કરી.

સત્તાવાર સાઇટ: React component (JSX)

JavaScript માં વધુ