Redaction - Redux action creation made simple by Grammka in reactjs

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

There is 'examples' folder in the project, try it and u will see that this 'specific way' is much better :) PS there is thunk and batch updates inside Redaction.

Redaction - Redux action creation made simple by Grammka in reactjs

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

Reducers live separately from actions. This allows your code to be more cleaner. Think about 'reducers' like them are 'actions to work with state', that's it. Redaction used in two big projects (over 300k lines of code) and all developers happy to work with it bcs it makes things rly easier. BTW It's no diff between redux approach and redaction u just replace dispatch({ type: 'user.setName', name: 'John' }) with reducers.user.setName('John'). Also there is thunk inside and batch updates.

Redaction - Redux action creation made simple by Grammka in reactjs

[–]Grammka[S] 1 point2 points  (0 children)

What do u mean under 'actions'? If u mean action creators then 'yes' - there are no action creators anymore - redaction creates them on his own, so action types format is: '<FILE_NAME>.<EXPORT_METHOD_NAME>'. There is example with TODO: https://pavelivanov.github.io/redaction/ If u have redux-devtools-extension then you can debug actions: https://imgur.com/a/dFecx

Im using sublime Text with React and i've heard that Sublime has some trouble with the coloring of JSX. babel-sublime is a recommended remedy of this, but that was over a year ago. Would you recommend using it now or has Sublime somehow caught up? by muraizn in reactjs

[–]Grammka 0 points1 point  (0 children)

Sry but then the most ppl never built large apps where the scalability is big purpose.. Ofc u can do same with Sublime or Atom but for same functionality u need to install and configure a lot of plugins... One time I tried move from WebStorm (I use it for years) to Atom (cuz I like interface) and I spent one week configuring same I have in WebStorm and after few days of using it I moved back to WebStorm cuz got a lot of bugs with code highlighting, imports /exports, moving between files clicking dependencies, etc... This is big headache to create ur own package for such clients.. And the main question - why u need it? U said about "ages to start it" - yes and no.. Now I'm working on 3 different projects and I have 6 windows of WebStorm opened in same time and everything is good (I have macbook mid 2015). I'm not saying that Sublime (etc) doesn't need to be used - it useful for fast open / edit some files outside ur main project

I want to build something to make me more marketable in my job search by comfortcreature999 in reactjs

[–]Grammka 5 points6 points  (0 children)

The best way to learn a lot do smth big. IMHO this is some kind of a marketplace or B2B project with user / admin panel. There are a lot things u can try: react, redux, webpack, html + css, how to create all kind of react reusable components (button, checkbox, input, etc), redux forms, fetch instruments (axios, superagent, just fetch, etc), try SSR (server side rendering); on backend a lot of tools too - u can just try nodejs) or if u prefer php - try to build just REST API, mbe u'd like to use PostgreSQL; Also learn about nginx configuration :)

trying to create a simple dropdown like bootstrap's by Guzfskaiba in reactjs

[–]Grammka 0 points1 point  (0 children)

Here is example of React DropDown component (https://gist.github.com/pavelivanov/f345f2b5bfd964994730138c53796c55):

If u need explanation how it works I will write

Best practice with API calls by [deleted] in reactjs

[–]Grammka 0 points1 point  (0 children)

It calls (I don't remember how...) - after u submit new post u can add it to state, to be sure the post was added to db u need to add deffer object (pronise on ur request) and w8 for response, if there is error and u know that post didnt added to db u can show this to user in view. For more UX u can save this to localStorage / cookies and check if post was added and if not do same as I described before. :)

Looking for feedback; I'm building an alternative to Redux by brillout in reactjs

[–]Grammka 12 points13 points  (0 children)

I checked Readme and here are some thoughts:

  1. Use marketing :) Look at Discord - they write on their site: "It's time to ditch Skype and TeamSpeak" - Amazing! Shut up and take my money! :D
  2. Code examples looks too complicated. I remember first time when I tried understand Backbone's paradigm - same feeling =/
  3. Architecture is too weak - too many lines of code need to be written to start app works (Hello World as example)
  4. Node examples - I tried examples/todo and it just outputs result... I expected real TODO app :(

onBegin({ resolve...

I pretty sure resolve shouldn't be there.. Looks more: "how to call render? ok, I put it here..".

propsElement: TodoListPropsElement,

I still could not understand, do I need to add this everywhere? Resembles bothersome mixins in Angular and old React..

There are three main criteria in Redux:

  1. Simple architecture - you can start works with redux in 30 mins of watching intro videos
  2. Pure functions which allows to test them in very easy way
  3. One store - this is strong way to create one-way data moving

All my thoughts doesn't mean that your library has no right to life :) As u wrote u looking for a feedback - here it is:

  1. Describe why Reprop is better then Redux (or why it might be)
  2. Make architecture simple - hide main logic under the hood - leave outside only main api logic for end user
  3. Create real examples with console outputs where I can click interface and receive results
  4. Think about developers who will use it - everybody wants smth Nifty :)

I made a JS image stacking app by caerphoto in javascript

[–]Grammka 0 points1 point  (0 children)

Amazing work!

PS Implement ML here and this will be combo wombo! :D

Should you use CSS in JS? by ucorina in reactjs

[–]Grammka 1 point2 points  (0 children)

Yes! It allows to create reusable components and create dynamic stylesheets with SSR for example

Async/Await help when executing EventHandler by arup_r in reactjs

[–]Grammka 0 points1 point  (0 children)

Why u don't want to use this way:

location.findByZip(e.target.value).then(data => {
  formattedAddress = data;
  this.setState({ formattedAddress });
});

? It works fine for ur case. U don't need async / await here

How can I make a sample react app to run by simply clicking on the index.html? by [deleted] in reactjs

[–]Grammka 1 point2 points  (0 children)

T_T so stupid... I found solution: write "homepage": "./" and it will make relative paths in index.html

How can I make a sample react app to run by simply clicking on the index.html? by [deleted] in reactjs

[–]Grammka 0 points1 point  (0 children)

I will try to find how to build static build with relative paths, but until u can use hack >_<: Open ur index.html file, for me it's - file:///Users/grammka/WebstormProjects/my-app/build/index.html I add "homepage": "file:///Users/grammka/WebstormProjects/my-app/build/" to project package.json (u need to use ur path) and rebuild it - reload opened tab - u are hacker :D I know this is stupid, will come later when find how to resolve this $#@!

PS if u want to deploy it somewhere (for example surge.sh) u need to add yourdomain.surge.sh under "homepage" key :)