Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How to show and hide loading image

Topic Labels: Extensions
475 0
Showing results for 
Search instead for 
Did you mean: 

I need to show and hide a loading image as my records is being fetched from airtable using the documentation code below

import { Loader } from "@airtable/blocks/ui";
const loaderExample = <Loader scale={0.3} />;

here is my code. can someone help me


import {initializeBlock, Loader, useBase, useRecords, table} from '@airtable/blocks/ui';
import React, { Component } from "react";
import {base} from '@airtable/blocks';

function Access (){ 
const base = useBase();
 const tab = base.getTableByNameIfExists('empoyee_table');
 const records = useRecords(tab);
return (

   <h1>Show Employee Records</h1> <br />

             { => {

                 return <li key={}>{}</li>
initializeBlock(() => <Access />);

export default Access;
0 Replies 0