github refinedev/refine @refinedev/core@4.44.3

Patch Changes

  • #5050 613af0021f6 Thanks @alicanerdurmaz! - feat: pass dataProviderName to liveProvider.subscribe method.
    From now on, you can use dataProviderName to distinguish between different data providers in live provider.

    Refer to documentation for more info about multiple data providers ->

    Usage

    import { useForm, useList } from "@refinedev/core";
    
    useList({
        dataProviderName: "first-data-provider",
    });
    
    useForm({
        dataProviderName: "second-data-provider",
    });
    import { LiveProvider } from "@refinedev/core";
    
    export const liveProvider = (client: any): LiveProvider => {
        return {
            subscribe: ({
                channel,
                types,
                params,
                callback,
                dataProviderName,
            }) => {
                console.log({ dataProviderName }); //  "second-data-provider"
            },
        };
    };
  • #5053 857d4020a30 Thanks @alicanerdurmaz! - feat: The parameter types of data provider methods have been exported.
    From now on, you can use the parameter types of Data Provider methods.

    import type {
        DataProvider,
        GetListResponse
        // new exported types
        GetListParams,
        GetManyParams,
        GetOneParams,
        CreateParams,
        CreateManyParams,
        UpdateParams,
        UpdateManyParams,
        DeleteOneParams,
        DeleteManyParams,
        CustomParams,
    } from "@refinedev/core";
    
    const myDataProvider: DataProvider = {
        getList: async (params: GetListParams): Promise<GetListResponse<any>> => {
            return { data: [], total: 0 };
        },
    };

Don't miss a new refine release

NewReleases is sending notifications on new releases.