![User banner](https://programming.dev/pictrs/image/ed555eee-0d64-4f7c-b41e-034a8da4be9e.jpeg)
How a Sword King Survives Against Fate. Chapter 202. Ryu Han-Bin was a normal person who just had been discharged from his mandatory military service, when he was transported to another world. Left to fend for himself,
![How a Sword King Survives Against Fate - Chapter 202 - LSComic](https://lemmy.blahaj.zone/pictrs/image/750e79c2-f667-4a9f-8387-6e53441a79f5.jpeg?format=webp&thumbnail=256)
Can confirm
How did that go? From finding the recruiter to getting the job, I have no idea how it usually goes.
If it's actual work that suits my experience and not some pitch to buy their product, then it'd be a nice foot in the door. We'll see how this goes.
Thank you! I knew there was something, but I wasn't sure what.
Thanks for sharing this. I really need to listen to that podcast more.
Exactly the same company. The fact that all of their glassdoor reviews are from India made me rethink if I should follow through. We'll see how it goes, but making a blacklist sounds pretty dope, so that's a nice new goal.
For some reason in middle school I tried it and, for obvious reasons, couldn't figure it out. Then in 2012-2014 Reddit kept telling everyone to learn Python. I failed that and kept trying randomly for 10 years. I've only recently begun making progress in web dev, which is deliberately avoided because of Reddit language opinions.
Ignoring all of that, I really like text editors for some reason, and I'm on a journey to make some. I still haven't made any, but it's a goal.
They're completely separate. I've heard that they're working on ways to fix this issue, though.
Question: How long does it take to get the proverbial ball rolling on Upwork? I used it for a month and spent $200+ and wasn't able to get any work.
If you loved Cradle, then you might like Bastion. If Crafle is eastern, then Bastion is Greco-Roman.
Scorio will rise from the ashes to conquer the ten layers of hell.
Reborn without memories, Scorio learns that he is a Great Soul, a legendary defender of the ancient city of Bastion. That within the hallowed halls of the Academy and under the stern eyes of the underworld’s greatest instructors he will enjoy enormous privilege, rediscover unique and wondrous powers, and one day return to the millennium-old battle against their infernal foes.
Until he is betrayed. Singled out and sentenced to die for crimes he can't remember, Scorio is hurled to his doom—and forgotten.
But from even the dimmest spark an inferno may one day rage.
Clawing his way back from oblivion, Scorio vows to return to the Academy at any cost. To emerge from the ruins and within those golden walls defeat his elite classmates in a quest to ascend the ranks and change the course of history. For only then will he learn about his forgotten past, and why his enemies have rightly feared him since the day he was reborn
For sure, I'll send you an email.
edit: sent. Thank you again for the help.
I'll stay away from the LLMs for now -- they're largely unhelpful anyway.
The value of those elements needs to be concatenated and displayed to the user. Is that right?
Right. The other components with a single text box seem to work fine, it's the multiple boxes in the phone component, and it's local state, that are confusing me to no end.
I think what you're talking about are Signals from Preact?
Oh, no, when I was talking to Bing it said that the local state interferes with the parent state, so I instead need to bring the parent state into the child. It sort of makes sense? At least the part that local and parent state can interfere with each other makes sense.
If you're still interested we could try writing a couple of basic components that get us part of the way there.
Please, I'm all ears. I have a feeling that your approach will help me a lot.
If there's any links, resources, mental models, or anything that you or anyone else think would be helpful in getting this to work, I'm all ears. Also, since it's pretty obvious that this is an assignment, my limitation is that I cannot use useEffect, and the PhoneComponent has to use 4 inputs.
I've been stuck on this for about a week now, so any help, feedback, insight, or articles I should read would be incredibly appreciated.
Hey, I'm just now seeing this. So, my component hierarchy is something like this:
App
- Form
- TextInput
- PhoneInput
The TextInput components are very simple:
import { ErrorMessage } from "../ErrorMessage"; //this function can be used to determine if the error message renders based on criteria
export const FunctionalTextInput = ({
dataProperty,
errorMessage,
placeholder,
value,
propertyHandler,
}: {
dataProperty: string;
errorMessage: string;
placeholder: string;
value: string;
propertyHandler: (property: string, e: string) => void;
}) => {
//Object.keys(initialUserData)[0]
return (
<>
<div>
{dataProperty}:
propertyHandler(dataProperty, e.target.value)}
/>
</div>
);
};
export const FunctionalTextInput = ({
dataProperty,
errorMessage,
placeholder,
value,
propertyHandler,
}: {
dataProperty: string;
errorMessage: string;
placeholder: string;
value: string;
propertyHandler: (property: string, e: string) => void;
}) => {
//Object.keys(initialUserData)[0]
return (
<>
<div>
{dataProperty}:
propertyHandler(dataProperty, e.target.value)}
/>
</div>
);
};
The shape of my data is like so:
export type UserInformation = {
firstName: string;
lastName: string;
email: string;
city: string;
phone: string[];
};
In my Form Component, I have two functions that work in the TextInput component, but not the PhoneInput component.
const dataHandler = (e: FormEvent) => {
e.preventDefault();
userDataHandler(formData);
setFormData(initialUserData);
};
const propertyHandler = (property: string, value: string) => {
setFormData((prevProp) => ({ ...prevProp, [property]: value }));
};
So, over the past few hours I've been trying to talk to bing about this, and get some answers. After a few hours, I finally think the problem is a conflict of state. It seems like the state I'm using in my PhoneInput component interferes with the state of the parent component. This seems to be the case since when I click submit, my dataHandler function doesn't trigger for the PhoneInput component.
So, I guess now I'm wondering how that works? I've heard of raising state to the parent, but passing state down, not as data, but as actual state, sounds difficult and somewhat complex. I'm wondering how to use this technique, the uses, and how I can determine when to use it. Or, better yet, maybe I'm missing something and the answer is right outside my reach.
The phone input in question:
// This is a component that is used for the phone input
// it wall accept 4 inputs, and "lift" the values to the parent component as a single, unformatted string.
import { ChangeEventHandler, useRef, useState } from "react";
import { ErrorMessage } from "../ErrorMessage";
type TPhoneInputProps = {
errorMessage: string;
dataProperty: string;
higherPhoneState: string[];
propertyHandler: (property: string, e: string) => void;
};
export const FunctionalPhoneInput = ({
errorMessage,
dataProperty,
higherPhoneState,
propertyHandler,
}: TPhoneInputProps) => {
const [phoneState, setPhoneState] = useState(["", "", "", ""]);
const phoneNumber = [
useRef(null),
useRef(null),
useRef(null),
useRef(null),
];
const phoneNum0 = phoneNumber[0];
const phoneNum1 = phoneNumber[1];
const phoneNum2 = phoneNumber[2];
const phoneNum3 = phoneNumber[3];
const phoneChangeController =
(
index: 0 | 1 | 2 | 3 // 1 | 2 | 3 | 4,
): ChangeEventHandler =>
(e: React.ChangeEvent) => {
const length = [2, 2, 2, 1];
const nextInput = phoneNumber[index + 1];
const prevInput = phoneNumber[index - 1];
const maxLength = length[index];
const value = e.target.value;
const shouldGoToNextInput =
maxLength === value.length && nextInput?.current;
const shouldGoToPrevInput = value.length === 0;
const newState = phoneState.map((phone, phoneIndex) =>
index === phoneIndex ? e.target.value : phone
);
if (shouldGoToNextInput) {
nextInput.current?.focus();
}
if (shouldGoToPrevInput) {
prevInput.current?.focus();
}
setPhoneState(newState);
console.log(newState.join(""));
console.log(dataProperty);
// Concatenate the new state with e.target.value to get the full phone number
// const fullPhoneNumber =
// newState.slice(0, index).join("") +
// e.target.value +
// newState.slice(index + 1).join("");
propertyHandler(dataProperty, newState.join(""));
};
return (
<>
<div>
Phone:
<div>
-
-
-
</div>
</div>
);
};
Please note that this component is 1000% broken. I was in the process of changing it with Bings suggestions, but it's frustrating getting anything useful out of the thing.
I've used it to help me understand some code concepts and debugging, but over the last two weeks, it went from competent to completely stupid half of the time. It also fails to connect so often, it's unreal.
Thank you 🙏
If you still have any, I'd appreciate one.
Godot is written in GoLang?
Can you tell me the appeal of Arc? I have it, and I've used it, but I just can't seem to "get it".
Thank you! Your reply provides a lot of missing context. It will be my bible, or at least part of the guidelines I need to get something started.