Coder Social home page Coder Social logo

cerebroapp / cerebro-ui Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 10.0 744 KB

๐Ÿ“ฆ Repository of common UI react components for Cerebro plugins

License: MIT License

JavaScript 12.29% CSS 16.30% TypeScript 71.41%
cerebro lib cerebro-ui cerebroapp-ui

cerebro-ui's People

Contributors

chflick avatar dubisdev avatar kelion avatar lawgsy avatar ogustavo-pereira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cerebro-ui's Issues

Loading component not working inside preload

I was following the example of using the "Preload" element to wrap a promise response, but I get an error on Loading element:

Preload.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.

If I dont specify a Loader everything works fine. I also tried to create my own Loader component but I got the same problem. Not really sure whats going on.

Here is my code for reference:

const { Preload, Loading } = require('cerebro-ui');
const NoteContents = require('./Preview/NoteContents');

const NotePreview = (key, promise) => (
  <Preload key={key} promise={promise} loader={Loading}>
    {(promiseResult) => <NoteContents key={key} contents={promiseResult} /> }
  </Preload >
);

And its being called like this:

 getPreview: () => {
                const promise = evernoteService.getNoteContent(note.guid);
                return NotePreview(note.guid, promise);
              }

Preload `loader` prop should allow stateless components

Currently loader={<Loading />} works, but it looks a bit ugly, would be much better to allow developers to pass any component, i.e. as a functional component loader={() => <Loading />} (currently it fails with PropTypes check)

fix(MacOS): nodobjc dependency error

    I'd also like to help here. I've got the same issue as in #607, the app won't show at all. Just to see what happens, I've tried locally checking out cerebro-ui and manually removing the places where `nodobjc` is used. The app starts, though there are still plenty of errors.

If help is wanted, I'd love to contribute.

Originally posted by @ChFlick in cerebroapp/cerebro#602 (comment)

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.