Giter Site home page Giter Site logo

Comments (4)

ThrowingSpoon avatar ThrowingSpoon commented on May 22, 2024

I called the 'time' component directly. In:

(mozaik project folder)/node_modules/mozaik-ext-time/client.js

I changed the single line of code from:

module.exports = require('./lib/client');

to:

module.exports = require('./lib/components/Clock.js');

This does however generate a warning:

Warning: Something is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory

Although the clock widget does appear to be working fine, does anybody know of any issues that may arise from calling this component directly?

Liam.

from mozaik.

plouc avatar plouc commented on May 22, 2024

@mblakele I have to fix the generator to only require extension's client if it's available.

from mozaik.

plouc avatar plouc commented on May 22, 2024

@ThrowingSpoon how do you instantiate the clock component ?
When you use mozaïk, the widget is instantiated using this code https://github.com/plouc/mozaik/blob/master/src/browser/components/Widget.jsx#L18
If you're curious, you can read more about this here https://gist.github.com/sebmarkbage/ae327f2eda03bf165261

from mozaik.

plouc avatar plouc commented on May 22, 2024

@mblakele I fixed the issue with extra client declaration, see plouc/mozaik-generator@6480b10
Feel free to re-open this issue if it does not fix the problem.
(You'll have to update the yeoman generator)

from mozaik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.