jQuery UI Widgets Forums React Can't include jqwidgets-react in project

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  valeriybv 6 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Can't include jqwidgets-react in project #102103

    valeriybv
    Participant

    Hello!
    I just recently downloaded components (6.0.6) for react and trying to use it with help of documentation https://www.jqwidgets.com/reactjs-components-documentation/

    So I reproduce all steps and everything work correctly
    1. I create a default ASP.NET Core 2.1 + Recat template application in MS Visual Studio 2017 v. 15.8.5
    2. I updated App.js with code in documentation https://www.jqwidgets.com/reactjs-components-documentation/documentation/create-react-app/index.htm
    EVERYTHING WORKS OK
    BUT if I made some refactoring, something goes wrong. My steps:

    1. As my first default App.js looks like this

    import React from ‘react’;
    import { Route } from ‘react-router’;
    import Layout from ‘./components/Layout’;
    import Home from ‘./components/Home’;
    import Counter from ‘./components/Counter’;
    import FetchData from ‘./components/FetchData’;

    export default () => (
    <Layout>
    <Route exact path=’/’ component={Home} />
    <Route path=’/counter’ component={Counter} />
    <Route path=’/fetchdata/:startDateIndex?’ component={FetchData} />
    </Layout>
    I decided to add a new element in Layout section, so
    2. I add a MyTest.js in component folder
    3. modify the Layout section of App.js with <Route path=’/mytest’ component={MyTest} />
    4. I fill MyTest.js with the code as in example https://www.jqwidgets.com/reactjs-components-documentation/documentation/create-react-app/index.htm
    5. I modified the import section of App.js with import MyTest from ‘./components/MyTest’;

    So I expected that when I run my project and go to localhost:port/mytest I will see the same result as if I put code directly in App.js
    BUT I recieved an error:

    ./src/components/MyTest.js
    Module not found: Can’t resolve ‘./assets/jqwidgets-react/react_jqxdatetimeinput’ in ‘D:\Work\VS2017 3V1\MyProjects\Test6\Test6\ClientApp\src\components’

    What exactly is going wrong?

    Can't include jqwidgets-react in project #102105

    valeriybv
    Participant

    Sorry, already find the problem

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.