안녕하세요 강사님 코드를 따라치면서 학습을 하고 있는데 <View style={styles.fixed}> 이 style 부분에 No overload matches this call. Overload 1 of 2, '(props: ViewProps): View', gave the following error. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'StyleProp<ViewStyle>'. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'ViewStyle'. Types of property 'position' are incompatible. Type 'string' is not assignable to type '"absolute" | "static" | "relative" | "fixed" | "sticky" | undefined'. Overload 2 of 2, '(props: ViewProps, context: any): View', gave the following error. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'StyleProp<ViewStyle>'. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'ViewStyle'. Types of property 'position' are incompatible. Type 'string' is not assignable to type '"absolute" | "static" | "relative" | "fixed" | "sticky" | undefined'.ts(2769) ViewPropTypes.d.ts(203, 3): The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>' ViewPropTypes.d.ts(203, 3): The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>' ( property ) style ?: StyleProp < ViewStyle > View Problem (Alt+F8) 이런 에러가 뜨는데 제가 어느 부분에서 잘못했는지, 왜 이런 에러가 발생했는지 모르겠습니다.... 전체 코드는 아래와 같습니다. import CustomButton from '@/components/CustomButton'; import InputFiled from '@/components/InputFiled'; import { colors } from '@/constants'; import { StyleSheet, View } from 'react-native'; export default function LoginScreen() { return ( <> <View style={styles.container}> <InputFiled label="이메일" placeholder="이메일을 입력해주세요" ></InputFiled> <InputFiled label="비민번호" placeholder="비밀번호를 입력해주세요" ></InputFiled> </View> <View style={styles.fixed}> <CustomButton label="로그인하기"></CustomButton> </View> </> ); } const styles = { container: { flex: 1, margin: 16, gap: 16, }, fixed: { position: 'absolute', bottom: 0, width: '100%', borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: colors.GRAY_300, paddingTop: 12, paddingHorizontal: 16, }, };
ReadComponent.js 파일을 만들고 ReadPage의 리턴 내용에 ReadComponent의 tno 값을 추가한 후에 npm start를 실행했는데 아래와 같은 에러가 발생했습니다. [eslint] src\components\menus\todo\ReadComponent.js Line 13:29: 'useState' is not defined no-undef Line 16:9: 'getOne' is not defined no-undef Search for the keywords to learn more about each error. ReadComponent.js의 useState와 getOne 로직 부분이 잘못 된 거 같아서 강의 영상을 다시 봤는데 틀린 부분이 없어 보여 어떤 게 문젠지 질문을 드리고 싶습니다. 참고용으로 ReadComponent.js의 내용을 추가해놓겠습니다. import React, { useEffect } from 'react'; const initState = { tno:0, title:'', writer:'', dueDate: '', complete: false } function ReadComponent({tno}) { const [todo, setTodo] = useState(initState) useEffect(() => { getOne(tno).then(data => { console.log(data) setTodo(data) }) }, [tno]); return ( <div> </div> ); } export default ReadComponent; 덧붙여서 툴은 vscode를 쓰고 있습니다. 잘 부탁드리겠습니다.
안녕하세요~! 소플님 덕분에 리액트 강의 잘보고 있습니다~! chapter_07 입장버튼을 10번 눌렀을때 콘솔로그가 밑에 처럼 찍히는건 이해가 되었는데 ====================== useEffect() is called. isFull: false Current count value: 10 밑에로그는 왜 다시 찍히는건가요?? ====================== useEffect() is called. isFull: true 9번까지는 위에로그가 안찍히는거 같은데 10번째에 로그가 찍히는 이유가 궁금합니다~!
안녕하세요 현재 리액트 강의 6.2) UI 구현하기를 수강 중 문제가 발생해서 질문 드립니다. App.css에서 스타일을 정의하고 적용을 하니 요소들이 오히려 우측으로 치우치고 화면을 축소 및 확대를 시켜도 중앙 정렬이 이루어지지 않습니다. 원인을 모르겠어서 질문 드립니다.
iOS로 구글 로그인하는거는 잘됩니다! 근데 aos로 로그인하면 이런 에러가 떠요,,, 학습에 관련된 질문만 해주세요. 질문은 상세하게 무엇이 궁금한지 작성해주세요. 질문은 '마크다운'을 사용하여 할 수 있습니다. 유사한 질문이 있었는지 살펴보고 질문 해주세요. 부담갖지 말고 강의에서 궁금하신 점 전부 질문해주세요 :)
이런식으로 실제 앱에서만 사용이 가능하다고 뜹니다ㅠ 찾아보니까 디버깅을 끄라는데 개발자 도구를 켜봐도(ctrl+m /cmd+m켜서 들어가는,,) Debugging을 끄는 부분이 안보여요,,, + Debug JS Remotely라는 부분을 끄라고 구글링을 하니까 나오는데 이 부분이 아예 개발자도구에서 안보입니다.. 학습에 관련된 질문만 해주세요. 질문은 상세하게 무엇이 궁금한지 작성해주세요. 질문은 '마크다운'을 사용하여 할 수 있습니다. 유사한 질문이 있었는지 살펴보고 질문 해주세요. 부담갖지 말고 강의에서 궁금하신 점 전부 질문해주세요 :)
app-91cf9a3 … .js:2 Uncaught (in promise) Error: We couldn't find the correct component chunk with the name "component---src-pages-index-tsx" at t.loadComponent ( app-91cf9a3….js:2:25195 ) 해당 오류가 나며 하얀화면만 뜹니다. 블로그 글로 url작성해서 들어가면 정상적으로 뜹니다.
최대한 자료를 찾아봐서 이해해보려고 했는데, 너무 헷갈려서 도움을 구하고자 질문을 올립니다. 강의에서 search page에는 페이지 이동 시 javascript bundle로써 전달 될 client component가 없기 때문에 그냥 rsc payload만 전달되는 것이라고 하셨는데, searchpage만 보면 client component가 없는 것이 맞지만, (with-searchbar)폴더 안에 layout으로 Searchbar component를 포함시킨 것은 어떻게 되는 것인지 궁금합니다. Searchbar component가 client component이므로 search page에서 직접적으로 import를 하지는 않았지만, 레이아웃으로써 사용되었기에 어쨌든 search page안에 client component가 포함되는 것은 아닌가요? 이해가 명확하게 되지 않아 질문조차 조금 난해하게 쓴 것 같아서 죄송합니다! 감사합니다.
zustand에 저장과 cookie 저장에 대해 보안적으로는 cookie가 더 안전하다고 들었습니다. xss 공격에는 HttpOnly를 통해 해결할 수 있지만 반환된 accessToken을 js로 접근하지 못하다 보니 저장을 할 수 없는 문제가 있지만 secure을 통해 https에서만 요청가게 할 수 있으며, sameSite를 통해 csrf의 공격에 방어할 수 있다 해서 secure, sameSite를 사용해 accessToken을 쿠키에 저장하는게 더 좋은 방법이라 생각 했는데 어떤 방식을 주로 사용하나요?
added 153 packages, and audited 154 packages in 2s 32 packages are looking for funding run `npm fund` for details found 0 vulnerabilities leeman01@idong-geon-ui-noteubug mall % npm list tailwindcss mall@0.0.0 /Users/leeman01/frontend2/mall └── (empty) leeman01@idong-geon-ui-noteubug mall % npm cache clean --force npm warn using --force Recommended protections disabled. leeman01@idong-geon-ui-noteubug mall % npm install -D tailwindcss postcss autoprefixer added 2 packages, and audited 156 packages in 772ms 32 packages are looking for funding run `npm fund` for details found 0 vulnerabilities leeman01@idong-geon-ui-noteubug mall % npm run dev > mall@0.0.0 dev > vite VITE v6.2.2 ready in 392 ms ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ➜ press h + enter to show help ^C leeman01@idong-geon-ui-noteubug mall % npm list tailwindcss mall@0.0.0 /Users/leeman01/frontend2/mall └── tailwindcss@4.0.14 leeman01@idong-geon-ui-noteubug mall % npx tailwindcss init -p npm error could not determine executable to run npm error A complete log of this run can be found in: /Users/leeman01/.npm/_logs/2025-03-18T07_59_35_501Z-debug-0.log leeman01@idong-geon-ui-noteubug mall % 이런 알수 없는 오류가 뜨는데 원인이 뭔지 궁금합니다