lib/react/rendering_context.rb
def raise_render_error(result)
        improper_render 'A different element was returned than was generated within the DSL.',
                        'Possibly improper use of Element#delete.' if @buffer.count == 1
        improper_render "Instead #{@buffer.count} elements were generated.",
                        'Do you want to wrap your elements in a div?' if @buffer.count > 1
        improper_render "Instead the component #{result} was returned.",
                        "Did you mean #{result}()?" if result.try :reactrb_component?
        improper_render "Instead the #{result.class} #{result} was returned.",
                        'You may need to convert this to a string.'
      end
# heurestically raise a meaningful error based on the situation
heurestically raise a meaningful error based on the situation
heurestically raise a meaningful error based on the situation
def raise_render_error(result)
        improper_render 'A different element was returned than was generated within the DSL.',
                        'Possibly improper use of Element#delete.' if @buffer.count == 1
        improper_render "Instead #{@buffer.count} elements were generated.",
                        'Do you want to wrap your elements in a div?' if @buffer.count > 1
        improper_render "Instead the component #{result} was returned.",
                        "Did you mean #{result}()?" if result.try :reactrb_component?
        improper_render "Instead the #{result.class} #{result} was returned.",
                        'You may need to convert this to a string.'
      end
def raise_render_error ( result ) improper_render 'A different element was returned than was generated within the DSL.' , 'Possibly improper use of Element#delete.' if @buffer . count == 1 improper_render "Instead #{@buffer.count} elements were generated." , 'Do you want to wrap your elements in a div?' if @buffer . count > 1 improper_render "Instead the component #{result} was returned." , "Did you mean #{result}()?" if result . try :reactrb_component? improper_render "Instead the #{result.class} #{result} was returned." , 'You may need to convert this to a string.' end
heurestically raise a meaningful error based on the situation
heurestically raise a meaningful error based on the situation
result