Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Erhan Abibula
    @ErhanAbi
    hello
    can you guys remove the -p option from webpack build? It eases the debugging of errors and I have some strange errors that I can hardly trace... :)
    Otherwise, a really nice library TBH! :) great job... :)
    João Neto
    @joaoneto
    hi @pfzero nice to see you here!
    yes, we will look at it!
    thanks
    Gino Tria
    @ginotria
    hello
    importing atellier(0.1.10) to my bare boilerplate produces an error
    alt
    what am I missing?
    here's the code
    import './stylesheets/common.scss';
    
    import React from 'react';
    import ReactDom from 'react-dom';
    import ReactAtellier from 'react-atellier';
    
    
    
    ReactDom.render((
        <h1>Hello</h1>
    ), document.getElementById('app'))
    Guilherme (Coder) de Souza
    @guisouza
    @ginotria you have to pass your React instance to Atellier
    oh . . sorry .. in the newer version you dont have to do this ..
    just try this :
    ReactDom.render((<ReactAtellier components={componentList} />),document.getElementById('app'))
    that components prop is an Array with the following format :
    import myComponents from 'myComponent';
    
    const componentList = myComponents.map( (comp)=> {
        return {
          componentName : comp.displayName,
          component : comp
        }
    })
    Gino Tria
    @ginotria
    thanks @guisouza, is it normal that I get the error above just by importing atellier?
    MacLovin
    @maclovin
    how can i add an component with params on atellier view??
    i'll need a wrapper or something like that?
    Guilherme (Coder) de Souza
    @guisouza
    @maclovin it uses your propTypes defined inside your component . .
    MacLovin
    @maclovin
    examples pls?
    actually, the documentation is missing some examples. please, put the material ui source on github
    Guilherme (Coder) de Souza
    @guisouza
    man, its simple like this :
    
    import myComponents from 'myComponent';
    
    const componentList = myComponents.map( (comp)=> {
        return {
          componentName : comp.displayName,
          component : comp
        }
    })
    <ReactAtellier components={componentList} />
    but your components needs PropTypes defined and default values : https://facebook.github.io/react/docs/reusable-components.html
    example of a component that receives the 'name' property
    var MyComponent = React.createClass({
      propTypes: {
        name: React.PropTypes.string
      },
    
      render: function() {
        return (
          <div>
            {this.props.name} // This must be a string or it will warn.
          </div>
        );
      }
    
    });
    Atellier will automatically read your propTypes ..
    MacLovin
    @maclovin
    bae, i do not use the same syntax and sometimes i don't want to use propTypes
    but, ok
    i will hack this
    Guilherme (Coder) de Souza
    @guisouza
    Thats not a use-case for a reusable component .. all of your props must have a type ..
    MacLovin
    @maclovin
    it's not a rule, right?
    and if i use a stateless functional components?
    Guilherme (Coder) de Souza
    @guisouza
    these components receive something through props ?
    MacLovin
    @maclovin
    and if i need mock props?
    yep
    Guilherme (Coder) de Souza
    @guisouza
    so you have to define propTypes,
    you can use defaultProps ..
    MacLovin
    @maclovin
    i will show u how i trying to use atellier inside my ecosystem
    Guilherme (Coder) de Souza
    @guisouza
    ok
    MacLovin
    @maclovin

    import React from 'react';

    const Component = ({img, label}) => (
    <div className="thumbnail">
    <div className="thumbnail__image">
    <img src={img} alt={label} />
    </div>.......

    i just define display name
    Guilherme (Coder) de Souza
    @guisouza
    think about this kind of component declaration as a component with just the render function .. or something like this .. you can define your propTypes/contextTypes like this :
    const Text = (props, context) =>
      <p style={context}>props.children</p>;
    Text.propTypes = {
      fontFamily: React.PropTypes.string
    };
    Avoid define your propTypes is definitely NOT a good choice ..
    MacLovin
    @maclovin
    thx
    Guilherme (Coder) de Souza
    @guisouza
    =D
    Ivan Babak
    @sompylasar
    @guisouza Is the scup/atellier maintained or abandoned?
    Sophie
    @iafiawik
    Hi! I'm looking at issue #36. I have the same problem with Atellier styles taking over my application. What can I do about it?