question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rely less on function calls to render components

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

More readable code, more familiar/similar to standard React APIs

What does the proposed API look like?

Hey guys,

First of all fantastic work in Ant Design!

I wanted to ask whether you have any plans to convert dependencies on function calls to render components to more react-style components.

e.g.

<Form.Item label="Name">
            {getFieldDecorator('name', {
                rules: [ { required: true } ]
            })(<Input/>)}
        </Form.Item>

to:

<Form.Item label="Name" name="name" rules={rules} component={Input} />

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
yuriloliveiracommented, Oct 10, 2018

Hi guys, well done with antdesign. I’ve been using it for a month, and I am really liking it so far.

But, I have to say that getFieldDecorator could, indeed, be more react-like, as Georgio pointed out.

Any thoughts regarding this matter.

1reaction
afc163commented, Feb 5, 2019
<Form.Item label="Name" name="name" rules={rules} />
  <Input />
<Form.Item>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding render-as-you-fetch with React & Relay
Re-rendering - each time your component is rendered it needs to retry fetching the data, even if it's unnecessary (e.g. a theme change)...
Read more >
Components and Props - React
Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. This page provides an introduction to...
Read more >
Understanding re-rendering and memoization in React
Re-rendering a component simply means calling the component's ... Memoization uses memory and can be less performant in certain cases.
Read more >
How to Optimize Components to Improve React Performance
In this tutorial, you will learn how to maximize React performance by measuring rendering bottlenecks and optimizing your components.
Read more >
React: jsx in a variable vs a function vs a separate component
React needs to resolve reference as well as execute the function after ... rendering statements or your functions return null (or less ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found