Reactjs 拆开({ 模式:道具模式, onSetStateCurrentTime:onSetStateCurrentTime, onSetStateSettingsList:onSetStateSettingsList, onSetStateStatisticsField:onSetStateStatisticsField, onSetStateStatisticsList:onSetStateStatisticsList, OnSetStateStatisticsUpdateSettingsList:OnSetStateStatisticsUpdateSettingsList, onSetStateInitiateSettings:onSetStateInitiateSettings, onSetStateInitiateSources:onSetStateInitiateSources, onSetStateUpdateRound:onSetStateUpdateRound, onSetStateDataCollection:onSetStateDataCollection, onSetStateActionUpdate:onSetStateActionUpdate, onSetStateActionRefresh:onSetStateActionRefresh, onSetStateUpdateCountryVisibility:onSetStateUpdateCountryVisibility }); return()=>{ engineService.clearSources(); }; }, []); //为每个主操作设置加载程序。 useffect(()=>{ engineService.updateActionLoader(false); },[国家列表]; //退出任何模式后-滚动回元素的垂直位置。 常量scrollToCountry=useCallback((数据)=>{ 常量{action,value}=数据; if(action=='modal'&&!value&&activeModalValue&&!isReplaceModalMode&&activeModalName!='country'){ 设置超时(()=>{ const offsetTop=elRefs.current.find(c=>c.current?.dataset?.countryId==activeModalValue).current.offsetTop; 如果(偏移>窗口内部高度){ 滚动到(0,偏移); } }, 10); } },[elRefs,activeModalValue,isReplaceModalMode]); //在主模式单击时更新操作。 const handleActionClick=useCallback((e)=>{ if(!isActionLoader){ 常数数据={ 操作:coreUtils.getAttributeName(e,“数据操作”), 值:coreUtils.getAttributeName(e,'name'), id:coreUtils.getAttributeName(即“数据国家id”) }; 滚动国家(数据); engineService.runMasterActionClick(数据); } },[elRefs,activeModalValue,isReplaceModalMode]); //更新有关模式更改的操作。 const handleModeLactionChange=useCallback((e)=>{ engineService.runModalActionUpdate({ modalName:coreUtils.getAttributeName(e,‘数据模式名’), 操作:coreUtils.getAttributeName(e,“数据操作”), 值:coreUtils.getValue(e) }); }, []); //验证所有OK以显示数据并生成国家/地区。 常量isInitiateComplete=!isDisplayError&&countriesList&&countriesList.length>0&&loadingPrecentage==100; const renderCountries=useCallback(()=>{ 常数countriesDOM=[]; 常量refsList=[]; for(设i=0;i

Reactjs 拆开({ 模式:道具模式, onSetStateCurrentTime:onSetStateCurrentTime, onSetStateSettingsList:onSetStateSettingsList, onSetStateStatisticsField:onSetStateStatisticsField, onSetStateStatisticsList:onSetStateStatisticsList, OnSetStateStatisticsUpdateSettingsList:OnSetStateStatisticsUpdateSettingsList, onSetStateInitiateSettings:onSetStateInitiateSettings, onSetStateInitiateSources:onSetStateInitiateSources, onSetStateUpdateRound:onSetStateUpdateRound, onSetStateDataCollection:onSetStateDataCollection, onSetStateActionUpdate:onSetStateActionUpdate, onSetStateActionRefresh:onSetStateActionRefresh, onSetStateUpdateCountryVisibility:onSetStateUpdateCountryVisibility }); return()=>{ engineService.clearSources(); }; }, []); //为每个主操作设置加载程序。 useffect(()=>{ engineService.updateActionLoader(false); },[国家列表]; //退出任何模式后-滚动回元素的垂直位置。 常量scrollToCountry=useCallback((数据)=>{ 常量{action,value}=数据; if(action=='modal'&&!value&&activeModalValue&&!isReplaceModalMode&&activeModalName!='country'){ 设置超时(()=>{ const offsetTop=elRefs.current.find(c=>c.current?.dataset?.countryId==activeModalValue).current.offsetTop; 如果(偏移>窗口内部高度){ 滚动到(0,偏移); } }, 10); } },[elRefs,activeModalValue,isReplaceModalMode]); //在主模式单击时更新操作。 const handleActionClick=useCallback((e)=>{ if(!isActionLoader){ 常数数据={ 操作:coreUtils.getAttributeName(e,“数据操作”), 值:coreUtils.getAttributeName(e,'name'), id:coreUtils.getAttributeName(即“数据国家id”) }; 滚动国家(数据); engineService.runMasterActionClick(数据); } },[elRefs,activeModalValue,isReplaceModalMode]); //更新有关模式更改的操作。 const handleModeLactionChange=useCallback((e)=>{ engineService.runModalActionUpdate({ modalName:coreUtils.getAttributeName(e,‘数据模式名’), 操作:coreUtils.getAttributeName(e,“数据操作”), 值:coreUtils.getValue(e) }); }, []); //验证所有OK以显示数据并生成国家/地区。 常量isInitiateComplete=!isDisplayError&&countriesList&&countriesList.length>0&&loadingPrecentage==100; const renderCountries=useCallback(()=>{ 常数countriesDOM=[]; 常量refsList=[]; for(设i=0;i,reactjs,create-react-app,Reactjs,Create React App,如何解决这个问题?好的,我解决了 问题在于一个名为MetaTags的组件: MetaTags.jsx import React from 'react'; import { Helmet } from 'react-helmet'; import { timeUtils } from '../../../utils'; const MetaTags = (<Helmet> <title data-rh="true">World

如何解决这个问题?

好的,我解决了

问题在于一个名为MetaTags的组件:

MetaTags.jsx

import React from 'react';
import { Helmet } from 'react-helmet';
import { timeUtils } from '../../../utils';

const MetaTags =
    (<Helmet>
        <title data-rh="true">World Covid 19 Data | Covid 19 World Data | {timeUtils.getTitleDate()}</title>
    </Helmet>);

export default MetaTags;
app = (
    <HelmetProvider>
        <Suspense fallback={null}>
            <Provider store={createStore(rootReducer, composeEnhancers(applyMiddleware(thunk)))}>
                <Helmet>
                    <title data-rh="true">Dynamic title {timeUtils.getTitleDate()}</title>
                </Helmet>
                <BrowserRouter>
                    {component}
                </BrowserRouter>
            </Provider>
        </Suspense>
    </HelmetProvider>
);
这解决了我的问题,警告也消失了

app = (
    <HelmetProvider>
        <Suspense fallback={null}>
            <Provider store={createStore(rootReducer, composeEnhancers(applyMiddleware(thunk)))}>
                <Helmet>
                    <title data-rh="true">Dynamic title {timeUtils.getTitleDate()}</title>
                </Helmet>
                <BrowserRouter>
                    {component}
                </BrowserRouter>
            </Provider>
        </Suspense>
    </HelmetProvider>
);