0

i have a folder component .

There is OutlinedField in component folder.

in App.js i do import OutlinedField from "./../component"; but it fails.

My code is at https://codesandbox.io/s/eloquent-cloud-ngk6u?file=/src/App.js

enter image description here

1 Answer 1

1

As you have component folder in same directory as app.js file, you only need to add
import OutlinedField from './component/OutlinedField'

App.js

import React from "react";
import "./styles.css";
import OutlinedField from './component/OutlinedField';
export default function App() {
  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
    </div>
  );
}

Sign up to request clarification or add additional context in comments.

2 Comments

that works..but how do i use that imported component codesandbox.io/s/pedantic-sanderson-ngzkr
Add this < OutlinedField /> Before closing tag of div

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.