@lpm.dev/neo.react-forms

Pool

react-forms

Modern, performant React form library - 78% smaller than Formik, perfect TypeScript inference

install @lpm.dev/neo.react-forms
99 exportsTypeScript

getValueByPath

function

@lpm.dev/neo.react-forms

function getValueByPath<T>(obj: T, path: string): unknown

Get value at a nested path

Parameters

objTObject to get value from
pathstringDot-separated path (e.g., "user.profile.name")

Returns

unknownValue at path or undefined

Example

getValueByPath({ user: { name: "John" } }, "user.name") // "John"