question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I need help . code splite done, but I get a warning.

See original GitHub issue
import React from 'react';
import { NavLink, Route, Switch } from "react-router-dom";
import Index from './index/index.jsx';

import loadable from '@loadable/component'
import Loading from "./loading";

const LoadableComponent = loadable(() => import(/* webpackChunkName: "article" */'./article/index.jsx'), {
  fallback: Loading,
})

export default class Router extends React.Component {
  render() {
    return (
      <div>
        <ul>
          <li><NavLink to="/" activeClassName="selected">Index</NavLink></li>
          <li><NavLink to="/article" activeClassName="selected">Article</NavLink></li>
        </ul>
        <Switch>
          <Route exact path="/" component={Index} />
          <Route exact path="/article" component={LoadableComponent} />
        </Switch>
      </div>
    );
  }
}
react-dom.development.js:506 Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
    in InnerLoadable (created by Context.Consumer)
    in Component (created by ForwardRef)
    in ForwardRef (created by Context.Consumer)
    in Route (created by Router)
    in Switch (created by Router)
    in div (created by Router)
    in Router
    in Router (created by BrowserRouter)
    in BrowserRouter

image

Everything is ok, when I remove this block… image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
zzyxkacommented, Apr 10, 2019

oh, I forget <>.

6reactions
zzyxkacommented, Apr 10, 2019

How to delete this issues , I feel so embarrassed. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Result and Error Codes - SQLite
The SQLITE_INTERNAL result code indicates an internal malfunction. In a working version of SQLite, an application should never see this result  ...
Read more >
The Error And Warning Log
The Error And Warning Log. SQLite can be configured to invoke a callback function containing an error code and a terse error message...
Read more >
call dbDisconnect() warning #1 - Bioconductor/AnnotationHub
My package gives the same warning in tests, and removing the txdb object does not help. Reproducable example: library(GenomicFeatures)
Read more >
SQLite: database corruption at line 56972 of [3bfa9cc97d ...
Database corruption doesn't seem to be fixed with repair-database. Server version 2.5.26. First run: $ urbackupsrv repair-database ...
Read more >
SQLite reference warning processor mismatch - Stack Overflow
NET connector, you will have to specify the architecture for your program. ... it contains native code - and thus it cannot run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found