DEV Community

Discussion on: How to create multi-step forms in React?

jaishinawaraj profile image
Nawaraj Jaishi • Edited

When i try to add "after"/ "before" to the location it throw error to me saying tthis :
"(JSX attribute) config?: StepsConfig | undefined
Type '{ navigation: { component: (props: NavigationComponentProps) => JSX.Element; location: string; }; }' is not assignable to type 'StepsConfig'.
The types of 'navigation.location' are incompatible between these types.
Type 'string' is not assignable to type '"after" | "before" | undefined'.ts(2322)
index.d.ts(17, 5): The expected type comes from property 'config' which is declared here on type 'IntrinsicAttributes & StepsProps' "

here is my code why this type of error occure here?
my code snappit is following:

const AccountOpenForm = () => {

const config = {
navigation: {
component: StepNagivation,
location: "after",

return (