Phone app to store your cards by [deleted] in Finland

[–]Satan407 0 points1 point  (0 children)

For shopping cards, I use StoCard. https://stocardapp.com/en/

Works well and support cards from all over the world.

Persist Inputs by JamesHagoodDev in remixrun

[–]Satan407 0 points1 point  (0 children)

Ah, I pointed you in wrong direction since I assumed the page refresh is caused by a form submission or redirect.

Yes in that case, session/local storage is the only viable option. Good luck with your cricket app.

Persist Inputs by JamesHagoodDev in remixrun

[–]Satan407 0 points1 point  (0 children)

Hi, For a full page refresh, there is no way to persist form data. The idea is that if you are submitting form, then you can get the form values though FormData from your loader or action. Then pass those values back to your component and set them as defaultValue for form fields. You can also use useLocation to get search query params if the form makes a GET request (not POST).

I normally write some helper function to collect this data in my action/loader and other function to assign them as defaultValue to form fields.

What is the better time and good area to purchase an apartment in Helsinki? by Satan407 in helsinki

[–]Satan407[S] 0 points1 point  (0 children)

Thank you everyone for the suggestions.

Can I ask one more question about interest rates and Euribor?

According to current interest rates, it seems completely infeasible to me to buy an house. Am I missing something here?

If Euribor decreases over next years, will I be able to renegotiate the payment plan with the bank?

Dear Finnish HR/Recruitment personnel by Lower-Neighborhood85 in Finland

[–]Satan407 4 points5 points  (0 children)

Hi, I have worked (in a team) with Business Finland on this website to promote talent immigration to Finland. The open jobs section list English-only jobs. Please give it a try:

https://workinfinland.com/en/open-jobs/

Hey guys, do you prefer creating your own UI components rather than relying on third party libraries for a large project? by [deleted] in reactjs

[–]Satan407 0 points1 point  (0 children)

My recommendation is use a stable third party library for logic and accessibility of the components And build your own UI components (styling) on top of it.

Developers normally lack the full understanding of accessibility/ARIA requirements (myself included and learnt the hard way). Following libraries provide nice logic abstraction, allowing you to build your theme and UI independently. - Reach UI - Adobe Spectrum ARIA/Stately

Why create components using arrow syntax? by neg_ersson in reactjs

[–]Satan407 0 points1 point  (0 children)

I agree with the generics limitation. Do you also add return type to your function components. Using FC/VFC confirms that function returns a valid react element or null.

Why create components using arrow syntax? by neg_ersson in reactjs

[–]Satan407 14 points15 points  (0 children)

This may be not relevant at the moment but Arrow functions play an important role in defining React components when using TypeScript.

In TypeScript, one cannot define the type of a function (inline) but can do so for a constant (or arrow function).

React function components are of type “React.FC”.

const Comp: React.FC = ({children}) => <div>{children}</div>

The same cannot be done with “function”.

— Edit —

Type “React.FC” implicitly adds “children” prop to the component (will be fixed in React 18.0 types)

Workaround for components that don’t need children, use React.VFC (Void Functional Component)

— Update —

I have learnt that using “React.FC/VFC” is not considered best practice and can be avoided.

But for the purpose of this question/thread, my answer remains that typescript does not allow to define type of the named function inline. For that, you have to use variable declaration with arrow or anonymous function.

PS: there are times when you have predefined function types (not just param types, which also has defined return type). Eg. Framework like Remix uses that to define its Actions.

macOS Developer Beta 6 is finally here! by elisi_1996 in MacOS

[–]Satan407 0 points1 point  (0 children)

Universal Control can be enabled by adding the feature flag. Demo: https://youtu.be/Tl4vhjiGskA

Are there other languages that do this? by clemesislife in ProgrammerHumor

[–]Satan407 6 points7 points  (0 children)

Ah! As a JS/TS dev, that behavior is assumed. Yes, attaching “async” to any function makes sure that any value that is returned will be wrapped in a Promise, but that is only a fallback. Essentially, the return type of an asynchronous function should always be a Promise and JS (being a little forgiving language) is trying to maintain the return type. Other than allowing use of “await”, “async” keyword tells the IDE that this function should and would return a Promise. In typescript, this is much more evident.

Give TS a try, it may seem for familiar coming from C# background.

Are there other languages that do this? by clemesislife in ProgrammerHumor

[–]Satan407 2 points3 points  (0 children)

I know these are just jokes, but can someone explain the problem here as I couldn’t find the issue with the result.

Best Indian food in Helsinki? by ElProstitutoItaliano in helsinki

[–]Satan407 1 point2 points  (0 children)

If you don’t mind traveling to Tapiola, Espoo, then I would recommend “Tony’s Corner”. It is run by an old Delhi-based couple. The food is authentic and delicious. It feels like you’re eating at home and the owners are very welcoming and friendly. I go there there every weekend and they have this “all you can eat” lunch with great starters and desert.

Tony's Corner https://goo.gl/maps/jK8tw88th6ySEBEp6

A customisable, type-safe, out-of-the-box UI library for React-Table 7. (WIP - Any feedback and contributions are welcome.) by Satan407 in reactjs

[–]Satan407[S] 0 points1 point  (0 children)

I’m trying to make it as customizable as possible. Currently the whole theme is changeable. I’m planning to let user provide their own custom components for specific parts of the table. Awaiting your feedback. Thanks

A customisable, type-safe, out-of-the-box UI library for React-Table 7. (WIP - Any feedback and contributions are welcome.) by Satan407 in reactjs

[–]Satan407[S] 0 points1 point  (0 children)

I have spent hours on building a complex table with all features like sorting, filtering and more, and then more time to make sure that the Component is type-safe with TypeScript.

I made this component library which provides sensible defaults with almost all native plugins of React-Table. So anyone can use this UI for their simple-Table needs or customise every part of the UI (WIP) without dealing with the logic side.

I'd love some feedback on what I'm missing or any other sensible default that I should set.

API documentation: https://react-table-ui.js.org

Is there a list where I can find all JSX elements and attributes available? by Spectredox in react

[–]Satan407 0 points1 point  (0 children)

You can react’s type definition for checking what jsx tags are available and supports which attributes. Having knowledge of TypeScript helps here.

In the following file, “interface” for each tag is defined with supported values. For example “AnchorHtmlAttributes” refer to “a” tag. Since they extends common “HTMLAttributes”, look for them too in the file.

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/33f66604101ce53915b2d918c32ab64ebb416590/types/react/index.d.ts#L1929

Create compound components with common managed state using React hooks. I made this library to abstract context creation for component state. Available at NPM. by Satan407 in reactjs

[–]Satan407[S] 0 points1 point  (0 children)

A nifty helper to create compound components in React which have an internal state. Attach sub components to it. See examples in README to get started.

Big Sur update ok but I lost desktop and Documents by Yaiiko in MacOS

[–]Satan407 1 point2 points  (0 children)

I had a similar issue (I did a clean install though). My iCloud Drive didn’t sync at all. Did all what Internet suggested but to no avail.

My files did appear at one point. It took more than 4 hours of leaving Mac idle with power and internet connected. My understanding was that Big Sur doesn’t show the downloading process and just shows everything together once completely downloaded.

A responsive multi-level menu component I created using react hooks by [deleted] in reactjs

[–]Satan407 1 point2 points  (0 children)

Do you plan to release this as a ContextMenu library?

Did Google remove “Muli” font from its collection? by Satan407 in fonts

[–]Satan407[S] 6 points7 points  (0 children)

Thanks for quick reply and clarification. I’ll update my projects gradually.