---
title: "Discussion on \"Formik: How to set initialValues from API\" | Hashnode"
description: "Discussion on \"Formik: How to set initialValues from API\". In my current Ruby on Rails project, I use React for the front end and I have to deal with many forms such as simple single forms and complex multi steps forms. Generally, as you know I have to handle form element states, validate the element values,..."
url: "https://hashnode.com/posts/formik-how-to-set-initialvalues-from-api/643530d0cd0582cce3a5b630"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Formik: How to set initialValues from API](https://sinn.hashnode.dev/formik-how-to-set-initialvalues-from-api?utm_source=hashnode&utm_medium=feed)

In my current Ruby on Rails project, I use React for the front end and I have to deal with many forms such as simple single forms and complex multi steps forms. Generally, as you know I have to handle form element states, validate the element values,...

Apr 11, 2023 · 2 min read · sinn.hashnode.dev  
Updated Jun 5, 2023  
Read the article

-   [#formik](https://hashnode.com/tag/formik)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Sinn Meas](https://hashnode.com/@Sinn)

@Sinn · Siem Reap, Cambodia

  
[View profile](https://hashnode.com/@Sinn)

A web developer in Ruby on Rails and React

My personal blog about software development and other topics.

## Responses 2

Markdown supported · ⌘↵ to post

[Chinenye Anikwenze](https://hashnode.com/@kodervine)

[Aug 24, 2023](https://hashnode.com/posts/formik-how-to-set-initialvalues-from-api/643530d0cd0582cce3a5b630/comment/64e714d0d46294f7a59e1b3d)

Thank you for this article. I had a bug with syncing the initial values from formik with api response and the enableReinitialize=true helped solve the bug

[Sinn Meas](https://hashnode.com/@Sinn)

[Sep 26, 2023](https://hashnode.com/posts/formik-how-to-set-initialvalues-from-api/643530d0cd0582cce3a5b630/comment/64e714d0d46294f7a59e1b3d#reply-6512611c555a1a5049a9e1fa)

I'm glad that it helped :-) Thank you for reading through.

[Crhistian](https://hashnode.com/@crhistian)

[Apr 11, 2023](https://hashnode.com/posts/formik-how-to-set-initialvalues-from-api/643530d0cd0582cce3a5b630/comment/6435495ffefbae6a6f561ebf)

Formik is no longer maintained [github.com/jaredpalmer/formik/issues/3663](https://github.com/jaredpalmer/formik/issues/3663)

I’d actually recommend react-hook-form if you’re starting a new project. Very similar API, popular, and actively maintained. [react-hook-form.com](http://react-hook-form.com/)

[Sinn Meas](https://hashnode.com/@Sinn)

[Apr 12, 2023](https://hashnode.com/posts/formik-how-to-set-initialvalues-from-api/643530d0cd0582cce3a5b630/comment/6435495ffefbae6a6f561ebf#reply-643622196699be6a40d4fe5e)

Thank you for pointing out, yet I haven't seen any notice. My post is from experience of my current project and I will consider your recommendation in a new project.
