Giter Club home page Giter Club logo

Comments (9)

jannikbuschke avatar jannikbuschke commented on May 17, 2024 1

Y would be cool if FastField would be supported. However I think that usually using Field will be fast enough, especially in production builds (formik also got faster with recent versions).

As I didn't yet encounter performance issues (and "premature optimization is the root of all evil") I will be reluctant to focus on this topic (unless I hit performance problems).

Contributions would be very welcome. I think these components should be separated from the current ones (to not overload them with responsibilities). Introducing new components with a *Fast suffix could be an option. Also putting them as static components on existing ones, like <Input.Fast ... /> ?
Or if possible allow them to be imported from a subnamespace/submodule (not sure about the correct javascript terms) and just use the same names. Like

import { Input } from "..formik-antd/fast"

from formik-antd.

voxtex avatar voxtex commented on May 17, 2024 1

I think this a great idea, I see performance issues with Formik when I have 25+ fields. Although I disagree it should be a separate component, why not make it a property on all existing components fast={true} and then use Field vs FastField in the component itself? Would reduce a lot of code duplication.

from formik-antd.

jannikbuschke avatar jannikbuschke commented on May 17, 2024 1

Your approach looks reasonable to me. Feel free to open a PR.

from formik-antd.

babbarankit avatar babbarankit commented on May 17, 2024

@jannikbuschke I think subnamespace will be good option. I can work on the PR.

from formik-antd.

jannikbuschke avatar jannikbuschke commented on May 17, 2024

@babbarankit I recently noticed that any exported component is available like import { Component } from "@jbuschke\formik-antd\lib\path-to-component

This is what you mean or?

from formik-antd.

jannikbuschke avatar jannikbuschke commented on May 17, 2024

Do you see performance problems in debug mode or with your production build?

from formik-antd.

dbousamra avatar dbousamra commented on May 17, 2024

I see problems in production build. I have ~ 30 fields in my form across several pages.

from formik-antd.

gabrielberlanda avatar gabrielberlanda commented on May 17, 2024

Hi @jannikbuschke, I'm having problems without fast field too, at my company we're trying to go prod asap, so I made a fork and implemented a wrapper for Formik Field with a fastMode support...
I'm starting now in open source, if u have time, check my fork implementation and if its ok I can send a PR fixing it.

Field with fast mode support implementation

from formik-antd.

jannikbuschke avatar jannikbuschke commented on May 17, 2024

FastField support is available in v1.9.0-beta.0
https://github.com/jannikbuschke/formik-antd#fastfield-support

Any feedback is appreciated!

from formik-antd.

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.