English 中文(简体)
塔布斯导航公司在当地码头工作,但没有在部署的版本中工作。
原标题:Tabbed Navigation working fine on localhost, but not in the deployed version

我正在使用Sermantic UI React tab部分,使网页转换器(无航线)。 直到上个月,当我无法在部署版本中找到另一个表格时,所有工作都是完美的。 在当地,该法典实行罚款,而且表格完全有效。 不知道网站的部署和运作情况。 愿意听取任何立场/类似经历。

我正在利用消防基地主办我的网站。 这里还有刺 the式的纳西化法。

import { Menu, Grid } from "semantic-ui-react";
import PageA from "./PageA";
import PageB from "./PageB";
import PageC from "./PageC";

class TabbedNavigation extends Component {
  state = { activeItem: "Alpha" };
  handleItemClick = (e, { name }) => this.setState({ activeItem: name });

  render() {
    const { activeItem } = this.state;

    return (
      <div>
        <Grid centered>
          <Menu pointing secondary>
            <Menu.Item
              name="Alpha"
              active={activeItem === "Alpha"}
              onClick={this.handleItemClick}
            />
            <Menu.Item
              name="Beta"
              active={activeItem === "Beta"}
              onClick={this.handleItemClick}
            />
            <Menu.Item
              name="Gamma"
              active={activeItem === "Gamma"}
              onClick={this.handleItemClick}
            />
          </Menu>
        </Grid>

        {/* ________________________________________________________________________________ */}
        {/* Active Tabs and respective content */}

        {activeItem === "Alpha" ? (
            <PageA />
        ) : null}

        {activeItem === "Beta" ? (
            <PageB />
        ) : null}

        {activeItem === "Gamma" ? (
            <PageC />
        ) : null}
      </div>
    );
  }
}

export default TabbedNavigation;

还在青少年中发现了这一警告。

Warning: ReactDOM.render is no longer supported in React 18. 
Use createRoot instead. Until you switch to the new API, your 
app will behave as if it s running React 17. Learn more: 
https://reactjs.org/link/switch-to-createroot
问题回答

暂无回答




相关问题
How to use one react app into another react app?

I have two react apps, parent app and child app. and child app have an hash router. I have build the child app using npm run build, It creates build folder. That build folder moved into inside the ...

how to get selected value in Ant Design

I want to print the selected value, and below is my option list: const vesselName = [ { value: 0 , label: ALBIDDA , }, { value: 1 , label: ALRUMEILA , }, { value: 2 ,...

How to add a <br> tag in reactjs between two strings?

I am using react. I want to add a line break <br> between strings No results and Please try another search term. . I have tried No results.<br>Please try another search term. but ...

热门标签